summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-11-12 18:56:45 +0100
committerJo-Philipp Wich <jo@mein.io>2020-11-12 18:56:45 +0100
commit225a2807f10ac02844eb2a7a65fdf7999a62ba66 (patch)
tree1d7a80adbd25096e9f55a0ee652d3286cb76de6a /tests
parentc447e58ebf3b04f129009f642d5d1be4ca8cee92 (diff)
ast: simplify declaration AST structure
Do not emit dummy T_ASSIGN nodes for plain variable declarations without initialization (`let foo` or `local foo`). This also allows simplifying `ut_check_for_in()` since we only need to deal with one common structure for both `for (... in ...)` and `for (local ... in ...)` cases. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/00_syntax/16_for_loop3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/00_syntax/16_for_loop b/tests/00_syntax/16_for_loop
index 2f8ca9f..a16e0cc 100644
--- a/tests/00_syntax/16_for_loop
+++ b/tests/00_syntax/16_for_loop
@@ -238,8 +238,7 @@ In line 2, byte 16:
Ensure that assignments in for-in loop expressions are rejected.
-- Expect stderr --
-Syntax error: Unexpected token
-Expecting ','
+Syntax error: Invalid for-in expression
In line 2, byte 15:
` for (local x = 1, y in {})`