fix a regression in tlexerex
This commit is contained in:
parent
8cb11aac4f
commit
8b63b84924
2 changed files with 14 additions and 14 deletions
|
|
@ -1168,6 +1168,7 @@ proc postExprBlocks(p: var TParser, x: PNode): PNode =
|
||||||
result = makeCall(result)
|
result = makeCall(result)
|
||||||
getTok(p)
|
getTok(p)
|
||||||
skipComment(p, result)
|
skipComment(p, result)
|
||||||
|
if p.tok.tokType notin {tkOf, tkElif, tkElse, tkExcept}:
|
||||||
var stmtList = newNodeP(nkStmtList, p)
|
var stmtList = newNodeP(nkStmtList, p)
|
||||||
let body = parseStmt(p)
|
let body = parseStmt(p)
|
||||||
stmtList.add body
|
stmtList.add body
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
import macros
|
import macros
|
||||||
|
|
||||||
macro match*(s: cstring|string; pos: int; sections: untyped): untyped =
|
macro match*(s: cstring|string; pos: int; sections: varargs[untyped]): untyped =
|
||||||
for sec in sections.children:
|
for sec in sections:
|
||||||
expectKind sec, nnkOfBranch
|
expectKind sec, nnkOfBranch
|
||||||
expectLen sec, 2
|
expectLen sec, 2
|
||||||
result = newStmtList()
|
result = newStmtList()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue