summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/main.nim2
-rw-r--r--compiler/msgs.nim8
-rw-r--r--compiler/packagehandling.nim4
-rw-r--r--compiler/renderer.nim2
-rw-r--r--compiler/semcall.nim2
-rw-r--r--compiler/semexprs.nim2
-rw-r--r--compiler/semstmts.nim2
-rw-r--r--compiler/sigmatch.nim4
-rw-r--r--compiler/strutils2.nim2
-rw-r--r--compiler/types.nim2
-rw-r--r--compiler/vm.nim4
11 files changed, 17 insertions, 17 deletions
diff --git a/compiler/main.nim b/compiler/main.nim
index 242bc0719..f9b0dd413 100644
--- a/compiler/main.nim
+++ b/compiler/main.nim
@@ -260,7 +260,7 @@ proc mainCommand*(graph: ModuleGraph) =
       conf.setNoteDefaults(warnLockLevel, false) # issue #13218
       conf.setNoteDefaults(warnRedefinitionOfLabel, false) # issue #13218
         # because currently generates lots of false positives due to conflation
-        # of labels links in doc comments, eg for random.rand:
+        # of labels links in doc comments, e.g. for random.rand:
         #  ## * `rand proc<#rand,Rand,Natural>`_ that returns an integer
         #  ## * `rand proc<#rand,Rand,range[]>`_ that returns a float
       commandDoc2(graph, false)
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index 7b691323f..be3dc5ec4 100644
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -233,11 +233,11 @@ template toFullPathConsiderDirty*(conf: ConfigRef; info: TLineInfo): string =
   string toFullPathConsiderDirty(conf, info.fileIndex)
 
 type FilenameOption* = enum
-  foAbs # absolute path, eg: /pathto/bar/foo.nim
-  foRelProject # relative to project path, eg: ../foo.nim
+  foAbs # absolute path, e.g.: /pathto/bar/foo.nim
+  foRelProject # relative to project path, e.g.: ../foo.nim
   foMagicSauce # magic sauce, shortest of (foAbs, foRelProject)
-  foName # lastPathPart, eg: foo.nim
-  foShort # foName without extension, eg: foo
+  foName # lastPathPart, e.g.: foo.nim
+  foShort # foName without extension, e.g.: foo
   foStacktrace # if optExcessiveStackTrace: foAbs else: foName
 
 proc toFilenameOption*(conf: ConfigRef, fileIdx: FileIndex, opt: FilenameOption): string =
diff --git a/compiler/packagehandling.nim b/compiler/packagehandling.nim
index 9a3224de2..a781f1d51 100644
--- a/compiler/packagehandling.nim
+++ b/compiler/packagehandling.nim
@@ -16,7 +16,7 @@ iterator myParentDirs(p: string): string =
     yield current
 
 proc getNimbleFile*(conf: ConfigRef; path: string): string =
-  ## returns absolute path to nimble file, eg: /pathto/cligen.nimble
+  ## returns absolute path to nimble file, e.g.: /pathto/cligen.nimble
   var parents = 0
   block packageSearch:
     for d in myParentDirs(path):
@@ -35,7 +35,7 @@ proc getNimbleFile*(conf: ConfigRef; path: string): string =
     if parents <= 0: break
 
 proc getPackageName*(conf: ConfigRef; path: string): string =
-  ## returns nimble package name, eg: `cligen`
+  ## returns nimble package name, e.g.: `cligen`
   let path = getNimbleFile(conf, path)
   result = path.splitFile.name
 
diff --git a/compiler/renderer.nim b/compiler/renderer.nim
index a4152cf29..765bcded5 100644
--- a/compiler/renderer.nim
+++ b/compiler/renderer.nim
@@ -1226,7 +1226,7 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext) =
     infixArgument(g, n, 1)
     put(g, tkSpaces, Space)
     gsub(g, n, 0)        # binary operator
-    # eg: `n1 == n2` decompses as following sum:
+    # e.g.: `n1 == n2` decompses as following sum:
     if n.len == 3 and not fits(g, oldLineLen + lsub(g, n[1]) + lsub(g, n[2]) + lsub(g, n[0]) + len("  ")):
       optNL(g, g.indent + longIndentWid)
     else:
diff --git a/compiler/semcall.nim b/compiler/semcall.nim
index 0446d28c2..70a7e099c 100644
--- a/compiler/semcall.nim
+++ b/compiler/semcall.nim
@@ -326,7 +326,7 @@ proc getMsgDiagnostic(c: PContext, flags: TExprFlags, n, f: PNode): string =
     var typeHint = ""
     if sym == nil:
       # Perhaps we're in a `compiles(foo.bar)` expression, or
-      # in a concept, eg:
+      # in a concept, e.g.:
       #   ExplainedConcept {.explain.} = concept x
       #     x.foo is int
       # We could use: `(c.config $ n[1].info)` to get more context.
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index b2f0207e7..cb119b3e8 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -432,7 +432,7 @@ proc isOpImpl(c: PContext, n: PNode, flags: TExprFlags): PNode =
       m.diagnostics = @[]
       m.diagnosticsEnabled = true
     res = typeRel(m, t2, t1) >= isSubtype # isNone
-    # `res = sameType(t1, t2)` would be wrong, eg for `int is (int|float)`
+    # `res = sameType(t1, t2)` would be wrong, e.g. for `int is (int|float)`
 
   result = newIntNode(nkIntLit, ord(res))
   result.typ = n.typ
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 4b79cd546..f83864775 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -435,7 +435,7 @@ proc semLowerLetVarCustomPragma(c: PContext, a: PNode, n: PNode): PNode =
   var b = a[0]
   if b.kind == nkPragmaExpr:
     if b[1].len != 1:
-      # we could in future support pragmas w args eg: `var foo {.bar:"goo".} = expr`
+      # we could in future support pragmas w args e.g.: `var foo {.bar:"goo".} = expr`
       return nil
     let nodePragma = b[1][0]
     # see: `singlePragma`
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index d5039fcad..2e332f105 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -1555,7 +1555,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType,
         for i in 1..<f.len:
           let x = PType(idTableGet(c.bindings, genericBody[i-1]))
           if x == nil:
-            discard "maybe fine (for eg. a==tyNil)"
+            discard "maybe fine (for e.g. a==tyNil)"
           elif x.kind in {tyGenericInvocation, tyGenericParam}:
             internalError(c.c.graph.config, "wrong instantiated type!")
           else:
@@ -2489,7 +2489,7 @@ proc matchesAux(c: PContext, n, nOrig: PNode, m: var TCandidate, marker: var Int
             container = nil
           else:
             # we end up here if the argument can be converted into the varargs
-            # formal (eg. seq[T] -> varargs[T]) but we have already instantiated
+            # formal (e.g. seq[T] -> varargs[T]) but we have already instantiated
             # a container
             #assert arg.kind == nkHiddenStdConv # for 'nim check'
             # this assertion can be off
diff --git a/compiler/strutils2.nim b/compiler/strutils2.nim
index 6cb50347f..f44b811c7 100644
--- a/compiler/strutils2.nim
+++ b/compiler/strutils2.nim
@@ -12,7 +12,7 @@ proc dataPointer*[T](a: T): pointer =
   ## same as C++ `data` that works with std::string, std::vector etc.
   ## Note: safe to use when a.len == 0 but whether the result is nil or not
   ## is implementation defined for performance reasons.
-  # this could be improved with ocmpiler support to avoid the `if`, eg in C++
+  # this could be improved with ocmpiler support to avoid the `if`, e.g. in C++
   # `&a[0]` is well defined even if a.size() == 0
   when T is string | seq:
     if a.len == 0: nil else: cast[pointer](a[0].unsafeAddr)
diff --git a/compiler/types.nim b/compiler/types.nim
index 42b7de416..1f2ee9d20 100644
--- a/compiler/types.nim
+++ b/compiler/types.nim
@@ -23,7 +23,7 @@ type
     preferTypeName,
     preferResolved, # fully resolved symbols
     preferMixed,
-      # most useful, shows: symbol + resolved symbols if it differs, eg:
+      # most useful, shows: symbol + resolved symbols if it differs, e.g.:
       # tuple[a: MyInt{int}, b: float]
 
 proc typeToString*(typ: PType; prefer: TPreferedDesc = preferName): string
diff --git a/compiler/vm.nim b/compiler/vm.nim
index 8aac11ff7..a6478f3f0 100644
--- a/compiler/vm.nim
+++ b/compiler/vm.nim
@@ -765,7 +765,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
         if regs[rb].node.kind == nkRefTy:
           regs[ra].node = regs[rb].node[0]
         elif not maybeHandlePtr(regs[rb].node, regs[ra], false):
-          ## eg: typ.kind = tyObject
+          ## e.g.: typ.kind = tyObject
           ensureKind(rkNode)
           regs[ra].node = regs[rb].node
       else:
@@ -996,7 +996,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
         if nb.kind != nc.kind: discard
         elif (nb == nc) or (nb.kind == nkNilLit): ret = true # intentional
         elif sameConstant(nb, nc): ret = true
-          # this also takes care of procvar's, represented as nkTupleConstr, eg (nil, nil)
+          # this also takes care of procvar's, represented as nkTupleConstr, e.g. (nil, nil)
         elif nb.kind == nkIntLit and nc.kind == nkIntLit and nb.intVal == nc.intVal: # TODO: nkPtrLit
           let tb = nb.getTyp
           let tc = nc.getTyp