summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-11-26 19:31:55 +0100
committerAraq <rumpf_a@web.de>2012-11-26 19:31:55 +0100
commitc43bf78000b21001726b31eb4259b90b3c91e03c (patch)
tree33d993b3dbcad8f317ebe3e86aba76cc62139085
parent2591ac0ada7f022b695b91f8ce9e5cfe1e7df299 (diff)
downloadNim-c43bf78000b21001726b31eb4259b90b3c91e03c.tar.gz
fixed recently introduced parser bugs
-rwxr-xr-xcompiler/parser.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/parser.nim b/compiler/parser.nim
index 077fc52f4..d5457fcd8 100755
--- a/compiler/parser.nim
+++ b/compiler/parser.nim
@@ -738,7 +738,7 @@ proc isExprStart(p: TParser): bool =
   of tkSymbol, tkAccent, tkOpr, tkNot, tkNil, tkCast, tkIf, 
      tkProc, tkIterator, tkBind, 
      tkParLe, tkBracketLe, tkCurlyLe, tkIntLit..tkCharLit, tkVar, tkRef, tkPtr, 
-     tkTuple, tkType, tkWhen, tkCase, tkShared:
+     tkTuple, tkObject, tkType, tkWhen, tkCase, tkShared:
     result = true
   else: result = false
   
@@ -790,7 +790,7 @@ proc primary(p: var TParser, mode: TPrimaryMode): PNode =
   of tkPtr: result = parseTypeDescKAux(p, nkPtrTy, mode)
   of tkShared: result = parseTypeDescKAux(p, nkSharedTy, mode)
   of tkType: result = parseTypeDescKAux(p, nkTypeOfExpr, mode)
-  of tkTuple: result = parseTuple(p)
+  of tkTuple: result = parseTuple(p, mode == pmTypeDef)
   of tkProc: result = parseProcExpr(p, mode notin {pmTypeDesc, pmTypeDef})
   of tkIterator:
     if mode in {pmTypeDesc, pmTypeDef}: