summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorflaviut <tamasflaviu@gmail.com>2014-06-04 15:30:37 -0400
committerflaviut <tamasflaviu@gmail.com>2014-06-04 15:30:37 -0400
commit90dc35c10998c279daf2b413aaf896cadaced699 (patch)
tree934efe591d4f3aebbb91312fd7b725075eee09ad
parent7e60cf2a3496eebe5757486230a5540405079980 (diff)
downloadNim-90dc35c10998c279daf2b413aaf896cadaced699.tar.gz
fix bug with unexpected tkInvalid,tkEof,tkComment
-rw-r--r--compiler/parser.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/parser.nim b/compiler/parser.nim
index ae115e749..ec829f644 100644
--- a/compiler/parser.nim
+++ b/compiler/parser.nim
@@ -303,6 +303,8 @@ proc parseSymbol(p: var TParser, allowNil = false): PNode =
         if accm == "": 
           parMessage(p, errIdentifierExpected, p.tok)
         break
+      of tkEof, tkInvalid, tkComment:
+          parMessage(p, errIdentifierExpected, p.tok)
       else:
         accm.add(tokToStr(p.tok))
         getTok(p)