diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-09-30 21:35:30 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-09-30 21:35:30 +0200 |
commit | ddc131cf07972decc206e033b2dd85a42eb1c98d (patch) | |
tree | 91cdafb802ebef32fd1f4d8b8347409165dee463 /compiler | |
parent | b2c358be96e496c37f4d02b0e886a06ed503af9e (diff) | |
download | Nim-ddc131cf07972decc206e033b2dd85a42eb1c98d.tar.gz |
the parser finally parses 'echo {1,2}' as it should
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/parser.nim | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/compiler/parser.nim b/compiler/parser.nim index 924f7f26c..e14a8fbdf 100644 --- a/compiler/parser.nim +++ b/compiler/parser.nim @@ -255,13 +255,6 @@ proc isUnary(p: TParser): bool = p.tok.strongSpaceB == 0 and p.tok.strongSpaceA > 0: result = true - # versions prior to 0.13.0 used to do this: - when false: - if p.strongSpaces: - result = true - else: - parMessage(p, warnDeprecated, - "will be parsed as unary operator; inconsistent spacing") proc checkBinary(p: TParser) {.inline.} = ## Check if the current parser token is a binary operator. @@ -700,12 +693,7 @@ proc primarySuffix(p: var TParser, r: PNode, baseIndent: int): PNode = result = r template somePar() = - if p.tok.strongSpaceA > 0: - if p.strongSpaces: - break - else: - parMessage(p, warnDeprecated, - "a [b] will be parsed as command syntax; spacing") + if p.tok.strongSpaceA > 0: break # progress guaranteed while p.tok.indent < 0 or (p.tok.tokType == tkDot and p.tok.indent >= baseIndent): |