diff options
author | hlaaftana <10591326+hlaaftana@users.noreply.github.com> | 2021-02-01 22:14:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-01 20:14:20 +0100 |
commit | def1f99289022a57e8edc3ffc296dd3a0f9b19c9 (patch) | |
tree | 3c3479ba22159be09a6cc571e3cc6b2b40ed1fe0 /tests | |
parent | 91ace2188a243b4453412ed1e79e2efcc62d95a6 (diff) | |
download | Nim-def1f99289022a57e8edc3ffc296dd3a0f9b19c9.tar.gz |
add finally as post expr block [backport:1.4] (#16896)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/parser/tpostexprblocks.nim | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/tests/parser/tpostexprblocks.nim b/tests/parser/tpostexprblocks.nim index c27bbf321..bc10a72e2 100644 --- a/tests/parser/tpostexprblocks.nim +++ b/tests/parser/tpostexprblocks.nim @@ -406,6 +406,98 @@ StmtList DiscardStmt Empty IntLit 0 + Command + Ident "foo390" + Call + Ident "x" + Do + Empty + Empty + Empty + FormalParams + Empty + IdentDefs + Ident "y" + Empty + Empty + Empty + Empty + StmtList + DiscardStmt + Empty + Do + Empty + Empty + Empty + FormalParams + Ident "int" + IdentDefs + Ident "z" + Empty + Empty + Empty + Empty + StmtList + DiscardStmt + Empty + Do + Empty + Empty + Empty + FormalParams + Ident "int" + IdentDefs + Ident "w" + Ident "int" + Empty + Empty + Empty + StmtList + DiscardStmt + Empty + StmtList + DiscardStmt + Empty + OfBranch + Ident "a" + StmtList + DiscardStmt + Empty + OfBranch + Par + Ident "a" + Ident "b" + StmtList + DiscardStmt + Empty + ElifBranch + Ident "a" + StmtList + DiscardStmt + Empty + ElifBranch + Par + Ident "a" + Ident "b" + StmtList + DiscardStmt + Empty + ExceptBranch + Ident "a" + StmtList + DiscardStmt + Empty + ExceptBranch + Par + Ident "a" + Ident "b" + StmtList + DiscardStmt + Empty + Finally + StmtList + DiscardStmt + Empty ''' """ @@ -540,3 +632,26 @@ dumpTree: foo380.add((quote do: discard )[0]) + + foo390 x do (y): + discard + do (z) -> int: + discard + do (w: int) -> int: + discard + do: + discard + of a: + discard + of (a, b): + discard + elif a: + discard + elif (a, b): + discard + except a: + discard + except (a, b): + discard + finally: + discard |