summary refs log tree commit diff stats
path: root/rod/semgnrc.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <andreas@andreas-laptop>2010-07-21 09:44:47 +0200
committerAndreas Rumpf <andreas@andreas-laptop>2010-07-21 09:44:47 +0200
commitd10973adb00840631e5314ec902d502f15934801 (patch)
treea207854b0cf984815beb26bf2d71933ce566f6d7 /rod/semgnrc.nim
parentc441cdb64ca5394f74faadf76563bcfafeda18f4 (diff)
downloadNim-d10973adb00840631e5314ec902d502f15934801.tar.gz
c2nim tool added
Diffstat (limited to 'rod/semgnrc.nim')
-rwxr-xr-xrod/semgnrc.nim12
1 files changed, 6 insertions, 6 deletions
diff --git a/rod/semgnrc.nim b/rod/semgnrc.nim
index fbc9f18bd..0a291cd42 100755
--- a/rod/semgnrc.nim
+++ b/rod/semgnrc.nim
@@ -1,11 +1,12 @@
 #
 #
 #           The Nimrod Compiler
-#        (c) Copyright 2009 Andreas Rumpf
+#        (c) Copyright 2010 Andreas Rumpf
 #
 #    See the file "copying.txt", included in this
 #    distribution, for details about the copyright.
 #
+
 # This implements the first pass over the generic body; it resolves some
 # symbols. Thus for generics there is a two-phase symbol lookup just like
 # in C++.
@@ -155,8 +156,8 @@ proc semGenericStmt(c: PContext, n: PNode, flags: TSemGenericFlags = {}): PNode
       if (a.kind != nkIdentDefs): IllFormedAst(a)
       checkMinSonsLen(a, 3)
       L = sonsLen(a)
-      a.sons[L - 2] = semGenericStmt(c, a.sons[L - 2], {withinTypeDesc}) # do not perform symbol lookup for default 
-                                                                         # expressions 
+      a.sons[L - 2] = semGenericStmt(c, a.sons[L - 2], {withinTypeDesc}) 
+      # do not perform symbol lookup for default expressions 
       for j in countup(0, L - 3): 
         addDecl(c, newSymS(skUnknown, getIdentNode(a.sons[j]), c))
   of nkConstSection: 
@@ -196,8 +197,7 @@ proc semGenericStmt(c: PContext, n: PNode, flags: TSemGenericFlags = {}): PNode
       of nkEnumFieldDef: a = n.sons[i].sons[0]
       of nkIdent: a = n.sons[i]
       else: illFormedAst(n)
-      addDeclAt(c, newSymS(skUnknown, getIdentNode(a.sons[i]), c), c.tab.tos -
-          1)
+      addDeclAt(c, newSymS(skUnknown, getIdentNode(a.sons[i]), c), c.tab.tos-1)
   of nkObjectTy, nkTupleTy: 
     nil
   of nkFormalParams: 
@@ -229,4 +229,4 @@ proc semGenericStmt(c: PContext, n: PNode, flags: TSemGenericFlags = {}): PNode
   else: 
     for i in countup(0, sonsLen(n) - 1): 
       result.sons[i] = semGenericStmt(c, n.sons[i], flags)
-  
\ No newline at end of file
+