diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-10-19 15:51:36 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-10-19 15:51:36 +0200 |
commit | 8be60dc6bd5885f2eda43d11077d2743dd0ee742 (patch) | |
tree | 064fce1fb94231755d5c1b939178c412ad827b75 | |
parent | 186e7d49d3629c7e701e6aa2e2507b6410dd2b1f (diff) | |
download | Nim-8be60dc6bd5885f2eda43d11077d2743dd0ee742.tar.gz |
allow 'block' and 'nkState' after return for easier state machine generation
-rw-r--r-- | compiler/semstmts.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index d6c2a9ea1..564ab7ac3 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -1832,7 +1832,8 @@ proc semStmtList(c: PContext, n: PNode, flags: TExprFlags): PNode = of LastBlockStmts: for j in countup(i + 1, length - 1): case n.sons[j].kind - of nkPragma, nkCommentStmt, nkNilLit, nkEmpty: discard + of nkPragma, nkCommentStmt, nkNilLit, nkEmpty, nkBlockExpr, + nkBlockStmt, nkState: discard else: localError(n.sons[j].info, errStmtInvalidAfterReturn) else: discard |