summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2015-02-15 16:20:32 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2015-02-15 16:20:32 +0000
commit657dca5c3b26a088ac291e06308d44d5e52c162f (patch)
treea3009486a0157d0a5d38bfabff3b041cab3e3779 /compiler
parentc95f6f117a665bc6d3d64ae8703459759973f63f (diff)
downloadNim-657dca5c3b26a088ac291e06308d44d5e52c162f.tar.gz
Fix typos
Diffstat (limited to 'compiler')
-rw-r--r--compiler/cgen.nim2
-rw-r--r--compiler/docgen.nim2
-rw-r--r--compiler/lambdalifting.nim2
-rw-r--r--compiler/lexer.nim4
-rw-r--r--compiler/msgs.nim2
-rw-r--r--compiler/nimblecmd.nim2
-rw-r--r--compiler/patterns.nim4
-rw-r--r--compiler/rodwrite.nim2
-rw-r--r--compiler/ropes.nim2
-rw-r--r--compiler/semcall.nim2
-rw-r--r--compiler/semexprs.nim2
-rw-r--r--compiler/semstmts.nim2
-rw-r--r--compiler/semtempl.nim2
-rw-r--r--compiler/semtypes.nim2
-rw-r--r--compiler/types.nim2
-rw-r--r--compiler/vmgen.nim2
16 files changed, 18 insertions, 18 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim
index a606cb5b9..cc376d87a 100644
--- a/compiler/cgen.nim
+++ b/compiler/cgen.nim
@@ -395,7 +395,7 @@ proc localVarDecl(p: BProc; s: PSym): PRope =
 
 proc assignLocalVar(p: BProc, s: PSym) =
   #assert(s.loc.k == locNone) # not yet assigned
-  # this need not be fullfilled for inline procs; they are regenerated
+  # this need not be fulfilled for inline procs; they are regenerated
   # for each module that uses them!
   let decl = localVarDecl(p, s).con(";" & tnl)
   line(p, cpsLocals, decl)
diff --git a/compiler/docgen.nim b/compiler/docgen.nim
index ce2fa1936..5439922af 100644
--- a/compiler/docgen.nim
+++ b/compiler/docgen.nim
@@ -272,7 +272,7 @@ proc complexName(k: TSymKind, n: PNode, baseName: string): string =
   ## type)?(,param type)*``. The callable type part will be added only if the
   ## node is not a proc, as those are the common ones. The suffix will be a dot
   ## and a single letter representing the type of the callable. The parameter
-  ## types will be added with a preceeding dash. Return types won't be added.
+  ## types will be added with a preceding dash. Return types won't be added.
   ##
   ## If you modify the output of this proc, please update the anchor generation
   ## section of ``doc/docgen.txt``.
diff --git a/compiler/lambdalifting.nim b/compiler/lambdalifting.nim
index e8c4e88dc..123445e1f 100644
--- a/compiler/lambdalifting.nim
+++ b/compiler/lambdalifting.nim
@@ -999,7 +999,7 @@ proc liftForLoop*(body: PNode): PNode =
   # proc invoke(iter: iterator(): int) =
   #   for x in iter(): echo x
   #
-  # --> When to create the closure? --> for the (count) occurence!
+  # --> When to create the closure? --> for the (count) occurrence!
   discard """
       for i in foo(): ...
 
diff --git a/compiler/lexer.nim b/compiler/lexer.nim
index 4fbac2d5c..fc40192b8 100644
--- a/compiler/lexer.nim
+++ b/compiler/lexer.nim
@@ -107,7 +107,7 @@ type
   TToken* = object            # a Nim token
     tokType*: TTokType        # the type of the token
     indent*: int              # the indentation; != -1 if the token has been
-                              # preceeded with indentation
+                              # preceded with indentation
     ident*: PIdent            # the parsed identifier
     iNumber*: BiggestInt      # the parsed integer literal
     fNumber*: BiggestFloat    # the parsed floating point literal
@@ -679,7 +679,7 @@ proc getOperator(L: var TLexer, tok: var TToken) =
     inc(pos)
   endOperator(L, tok, pos, h)
   # advance pos but don't store it in L.bufpos so the next token (which might
-  # be an operator too) gets the preceeding spaces:
+  # be an operator too) gets the preceding spaces:
   tok.strongSpaceB = 0
   while buf[pos] == ' ':
     inc pos
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index 87c6e8225..7b94a3408 100644
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -359,7 +359,7 @@ const
     errCannotInferReturnType: "cannot infer the return type of the proc",
     errGenericLambdaNotAllowed: "A nested proc can have generic parameters only when " &
                                 "it is used as an operand to another routine and the types " &
-                                "of the generic paramers can be infered from the expected signature.",
+                                "of the generic paramers can be inferred from the expected signature.",
     errCompilerDoesntSupportTarget: "The current compiler \'$1\' doesn't support the requested compilation target",
     errUser: "$1", 
     warnCannotOpenFile: "cannot open \'$1\' [CannotOpenFile]",
diff --git a/compiler/nimblecmd.nim b/compiler/nimblecmd.nim
index 049b94aa9..23f3331a2 100644
--- a/compiler/nimblecmd.nim
+++ b/compiler/nimblecmd.nim
@@ -33,7 +33,7 @@ proc `<.`(a, b: string): bool =
   while true:
     let ii = parseInt(a, verA, i)
     let jj = parseInt(b, verB, j)
-    # if A has no number left, but B has, B is prefered:  0.8 vs 0.8.3
+    # if A has no number left, but B has, B is preferred:  0.8 vs 0.8.3
     if ii <= 0 or jj <= 0: return jj > 0
     if verA < verB: return true
     elif verA > verB: return false
diff --git a/compiler/patterns.nim b/compiler/patterns.nim
index 9ac0988c5..368b0b37b 100644
--- a/compiler/patterns.nim
+++ b/compiler/patterns.nim
@@ -275,7 +275,7 @@ proc applyRule*(c: PContext, s: PSym, n: PNode): PNode =
           if arg != rs and aliases.isPartOf(rs, arg) == arYes:
             ok = true
             break
-        # constraint not fullfilled:
+        # constraint not fulfilled:
         if not ok: return nil
       of aqNoAlias:
         # it MUST not alias with any other param:
@@ -284,7 +284,7 @@ proc applyRule*(c: PContext, s: PSym, n: PNode): PNode =
           if arg != rs and aliases.isPartOf(rs, arg) != arNo:
             ok = false
             break
-        # constraint not fullfilled:
+        # constraint not fulfilled:
         if not ok: return nil
 
   markUsed(n.info, s)
diff --git a/compiler/rodwrite.nim b/compiler/rodwrite.nim
index 9fed7ac52..0f211b4ba 100644
--- a/compiler/rodwrite.nim
+++ b/compiler/rodwrite.nim
@@ -200,7 +200,7 @@ proc encodeType(w: PRodWriter, t: PType, result: var string) =
     return
   # we need no surrounding [] here because the type is in a line of its own
   if t.kind == tyForward: internalError("encodeType: tyForward")
-  # for the new rodfile viewer we use a preceeding [ so that the data section
+  # for the new rodfile viewer we use a preceding [ so that the data section
   # can easily be disambiguated:
   add(result, '[')
   encodeVInt(ord(t.kind), result)
diff --git a/compiler/ropes.nim b/compiler/ropes.nim
index b14081694..ad6801d18 100644
--- a/compiler/ropes.nim
+++ b/compiler/ropes.nim
@@ -52,7 +52,7 @@
 #  Note that the left and right pointers are not needed for leaves.
 #  Leaves have relatively high memory overhead (~30 bytes on a 32
 #  bit machines) and we produce many of them. This is why we cache and
-#  share leaves accross different rope trees.
+#  share leaves across different rope trees.
 #  To cache them they are inserted in a `cache` array.
 
 import 
diff --git a/compiler/semcall.nim b/compiler/semcall.nim
index 5cb713030..43fd5fb86 100644
--- a/compiler/semcall.nim
+++ b/compiler/semcall.nim
@@ -264,7 +264,7 @@ proc inferWithMetatype(c: PContext, formal: PType,
     instGenericConvertersArg(c, result, m)
   if result != nil:
     # This almost exactly replicates the steps taken by the compiler during
-    # param matching. It performs an embarassing ammount of back-and-forth
+    # param matching. It performs an embarrassing amount of back-and-forth
     # type jugling, but it's the price to pay for consistency and correctness
     result.typ = generateTypeInstance(c, m.bindings, arg.info,
                                       formal.skipTypes({tyCompositeTypeClass}))
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 786479b95..bce766626 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -1917,7 +1917,7 @@ proc semObjConstr(c: PContext, n: PNode, flags: TExprFlags): PNode =
       it.sons[0] = newSymNode(f)
       e = fitNode(c, f.typ, e)
       # small hack here in a nkObjConstr the ``nkExprColonExpr`` node can have
-      # 3 childen the last being the field check
+      # 3 children the last being the field check
       if check != nil:
         check.sons[0] = it.sons[0]
         it.add(check)
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 9c8c80d7f..42471bae7 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -369,7 +369,7 @@ proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode =
           typ = def.typ
         else:
           # BUGFIX: ``fitNode`` is needed here!
-          # check type compability between def.typ and typ        
+          # check type compatibility between def.typ and typ        
           def = fitNode(c, typ, def)
           #changeType(def.skipConv, typ, check=true)
       else:
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim
index a5cfc1c22..47602368a 100644
--- a/compiler/semtempl.nim
+++ b/compiler/semtempl.nim
@@ -494,7 +494,7 @@ proc semTemplateDef(c: PContext, n: PNode): PNode =
     semParamList(c, n.sons[paramsPos], gp, s)
     # a template's parameters are not gensym'ed even if that was originally the
     # case as we determine whether it's a template parameter in the template
-    # body by the absense of the skGenSym flag:
+    # body by the absence of the skGenSym flag:
     for i in 1 .. s.typ.n.len-1:
       s.typ.n.sons[i].sym.flags.excl sfGenSym
     if sonsLen(gp) > 0:
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index 7ee2fe380..808653d55 100644
--- a/compiler/semtypes.nim
+++ b/compiler/semtypes.nim
@@ -900,7 +900,7 @@ proc semProcTypeNode(c: PContext, n, genericParams: PNode,
 
     if hasDefault:
       def = semExprWithType(c, a.sons[length-1]) 
-      # check type compability between def.typ and typ:
+      # check type compatibility between def.typ and typ:
       if typ == nil:
         typ = def.typ
       elif def != nil:
diff --git a/compiler/types.nim b/compiler/types.nim
index 2422d5305..85b0f9ed0 100644
--- a/compiler/types.nim
+++ b/compiler/types.nim
@@ -649,7 +649,7 @@ proc lengthOrd(t: PType): BiggestInt =
 type
   TDistinctCompare* = enum ## how distinct types are to be compared
     dcEq,                  ## a and b should be the same type
-    dcEqIgnoreDistinct,    ## compare symetrically: (distinct a) == b, a == b
+    dcEqIgnoreDistinct,    ## compare symmetrically: (distinct a) == b, a == b
                            ## or a == (distinct b)
     dcEqOrDistinctOf       ## a equals b or a is distinct of b
 
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim
index 70f81bc72..c69957032 100644
--- a/compiler/vmgen.nim
+++ b/compiler/vmgen.nim
@@ -1246,7 +1246,7 @@ proc genGlobalInit(c: PCtx; n: PNode; s: PSym) =
   c.globals.add(getNullValue(s.typ, n.info))
   s.position = c.globals.len
   # This is rather hard to support, due to the laziness of the VM code
-  # generator. See tests/compile/tmacro2 for why this is necesary:
+  # generator. See tests/compile/tmacro2 for why this is necessary:
   #   var decls{.compileTime.}: seq[PNimrodNode] = @[]
   let dest = c.getTemp(s.typ)
   c.gABx(n, opcLdGlobal, dest, s.position)