diff options
Diffstat (limited to 'compiler/parser.nim')
-rw-r--r-- | compiler/parser.nim | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/parser.nim b/compiler/parser.nim index 07f5c9de9..5c7b86240 100644 --- a/compiler/parser.nim +++ b/compiler/parser.nim @@ -220,7 +220,7 @@ proc getPrecedence(tok: TToken, strongSpaces: bool): int = of tkIn, tkNotin, tkIs, tkIsnot, tkNot, tkOf, tkAs: result = 5 of tkDotDot: result = considerStrongSpaces(6) of tkAnd: result = 4 - of tkOr, tkXor: result = 3 + of tkOr, tkXor, tkPtr, tkRef: result = 3 else: result = -10 proc isOperator(tok: TToken): bool = @@ -967,7 +967,7 @@ proc isExprStart(p: TParser): bool = of tkSymbol, tkAccent, tkOpr, tkNot, tkNil, tkCast, tkIf, tkProc, tkIterator, tkBind, tkAddr, tkParLe, tkBracketLe, tkCurlyLe, tkIntLit..tkCharLit, tkVar, tkRef, tkPtr, - tkTuple, tkObject, tkType, tkWhen, tkCase, tkShared: + tkTuple, tkObject, tkType, tkWhen, tkCase: result = true else: result = false @@ -1040,7 +1040,6 @@ 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 tkDistinct: result = parseTypeDescKAux(p, nkDistinctTy, mode) of tkType: result = parseTypeDescKAux(p, nkTypeOfExpr, mode) of tkTuple: result = parseTuple(p, mode == pmTypeDef) |