summary refs log tree commit diff stats
path: root/tests/parser
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2017-04-14 15:01:27 +0300
committerZahary Karadjov <zahary@gmail.com>2017-04-14 23:48:43 +0300
commit8de19a7f4c5387042994e061aa28545b090b3997 (patch)
treece5842611c8a7a5f04568aeb64a26c655951ad7c /tests/parser
parent03770daba44fb9ac5c21729d0b32cda10f8767bd (diff)
downloadNim-8de19a7f4c5387042994e061aa28545b090b3997.tar.gz
fix a parsing regression (do is still mandatory in some situations)
Diffstat (limited to 'tests/parser')
-rw-r--r--tests/parser/tpostexprblocks.nim16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/parser/tpostexprblocks.nim b/tests/parser/tpostexprblocks.nim
index b7f97785b..85f2628bf 100644
--- a/tests/parser/tpostexprblocks.nim
+++ b/tests/parser/tpostexprblocks.nim
@@ -371,6 +371,17 @@ StmtList
         StmtList
           DiscardStmt
             Empty
+  Call
+    DotExpr
+      Ident !"result"
+      Ident !"add"
+    BracketExpr
+      Call
+        Ident !"quote"
+        StmtList
+          DiscardStmt
+            Empty
+      IntLit 0
 '''
 """
 
@@ -495,3 +506,8 @@ dumpTree:
   else:
     discard
 
+  # some edge cases
+  result.add((quote do:
+    discard
+  )[0])
+