diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/parser.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/parser.nim b/compiler/parser.nim index ac0a57770..d7a1a75e3 100644 --- a/compiler/parser.nim +++ b/compiler/parser.nim @@ -744,8 +744,9 @@ proc primarySuffix(p: var TParser, r: PNode, baseIndent: int): PNode = # progress guaranteed somePar() result = namedParams(p, result, nkCurlyExpr, tkCurlyRi) - of tkSymbol, tkAccent, tkIntLit..tkCharLit, tkNil, tkCast, tkAddr, tkType: - if p.inPragma == 0: + of tkSymbol, tkAccent, tkIntLit..tkCharLit, tkNil, tkCast, tkAddr, tkType, + tkOpr, tkDotDot: + if p.inPragma == 0 and (isUnary(p) or p.tok.tokType notin {tkOpr, tkDotDot}): # actually parsing {.push hints:off.} as {.push(hints:off).} is a sweet # solution, but pragmas.nim can't handle that let a = result |