diff options
author | Araq <rumpf_a@web.de> | 2016-01-18 10:55:23 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2016-01-18 10:55:23 +0100 |
commit | 55c1f3d30ce5d2ab8745ab2b98a38a605c690a54 (patch) | |
tree | d729e8c0d7c929208c84450ad4a449e3eb32491e /compiler/parser.nim | |
parent | 68cbb4d2b4bc408e13fc27e6d054e3a0bb98bfb4 (diff) | |
parent | 2309975f782bf59b240e3874d5c31b4b299eca5d (diff) | |
download | Nim-55c1f3d30ce5d2ab8745ab2b98a38a605c690a54.tar.gz |
Merge branch 'devel' of https://github.com/nim-lang/Nim into devel
Diffstat (limited to 'compiler/parser.nim')
-rw-r--r-- | compiler/parser.nim | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/compiler/parser.nim b/compiler/parser.nim index 11dd6788a..c4681a5cd 100644 --- a/compiler/parser.nim +++ b/compiler/parser.nim @@ -112,12 +112,7 @@ proc rawSkipComment(p: var TParser, node: PNode) = if p.tok.tokType == tkComment: if node != nil: if node.comment == nil: node.comment = "" - if p.tok.literal == "[]": - node.flags.incl nfIsCursor - #echo "parser: " - #debug node - else: - add(node.comment, p.tok.literal) + add(node.comment, p.tok.literal) else: parMessage(p, errInternal, "skipComment") getTok(p) @@ -250,12 +245,14 @@ proc isUnary(p: TParser): bool = if p.tok.tokType in {tkOpr, tkDotDot} and p.tok.strongSpaceB == 0 and p.tok.strongSpaceA > 0: - # XXX change this after 0.10.4 is out - if p.strongSpaces: result = true - else: - parMessage(p, warnDeprecated, - "will be parsed as unary operator; inconsistent spacing") + # 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. |