next steps for first class iterators

This commit is contained in:
Araq 2012-11-26 02:43:32 +01:00
commit dd9ad9e497
7 changed files with 16 additions and 7 deletions

View file

@ -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:
tkTuple, tkType, tkWhen, tkCase, tkShared:
result = true
else: result = false
@ -788,6 +788,7 @@ proc primary(p: var TParser, mode: TPrimaryMode): PNode =
of tkVar: result = parseTypeDescKAux(p, nkVarTy, mode)
of tkRef: result = parseTypeDescKAux(p, nkRefTy, mode)
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 tkProc: result = parseProcExpr(p, mode notin {pmTypeDesc, pmTypeDef})