Skip to content

Commit a9c9e91

Browse files
committed
Translate for-loop operator
1 parent aad2a6a commit a9c9e91

18 files changed

+149
-33
lines changed

spec/tags/truffle/parsing/parsing_tags.txt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
fails:Parsing a For operator (multi-assignment / with multiple variables (for a, b, c in [])) case is parsed correctly
2-
fails:Parsing a For operator (multi-assignment / with nested multi assignment (for a, (b, c) in [])) case is parsed correctly
3-
fails:Parsing a For operator (multi-assignment / with preceding variables, splat operator and following variables (for a, *b, c in [])) case is parsed correctly
4-
fails:Parsing a For operator (multi-assignment / with preceding variables and implicit rest (for a, in [])) case is parsed correctly
5-
fails:Parsing a For operator (multi-assignment / with preceding variables and splat operator (for a, b, *c in [])) case is parsed correctly
6-
fails:Parsing a For operator (multi-assignment / with splat operator and following variables (for *a, b, c in [])) case is parsed correctly
7-
fails:Parsing a For operator (with attribute assignment (for a.b in [])) case is parsed correctly
8-
fails:Parsing a For operator (with class variable (for @@a in [])) case is parsed correctly
9-
fails:Parsing a For operator (with constant (for A in [])) case is parsed correctly
10-
fails:Parsing a For operator (with fully qualified constant (for A in [])) case is parsed correctly
11-
fails:Parsing a For operator (with global variable (for $a in [])) case is parsed correctly
12-
fails:Parsing a For operator (with instance variable (for @a in [])) case is parsed correctly
13-
fails:Parsing a For operator (with local variable (for a in [])) case is parsed correctly
14-
fails:Parsing a For operator (with reference assignment (for a[b] in [])) case is parsed correctly
15-
fails:Parsing a For operator (with reference assignment and multiple explicit arguments (for a[b, c] in [])) case is parsed correctly
16-
171
# Not supported yet by Prism
182
# See https://github.com/ruby/prism/issues/1997
193
fails:Parsing a Regexp (encoding / when there are non-ASCII characters in a literal) case is parsed correctly

spec/truffle/parsing/fixtures/for/multi_assignment/with_multiple_variables.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ast: |
4848
CatchBreakNode
4949
attributes:
5050
breakID = org.truffleruby.language.control.BreakID@...
51-
flags = 1
51+
flags = 0
5252
isWhile = false
5353
children:
5454
body =

spec/truffle/parsing/fixtures/for/multi_assignment/with_nested_multi_assignment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ast: |
4848
CatchBreakNode
4949
attributes:
5050
breakID = org.truffleruby.language.control.BreakID@...
51-
flags = 1
51+
flags = 0
5252
isWhile = false
5353
children:
5454
body =

spec/truffle/parsing/fixtures/for/multi_assignment/with_preceding_splat_operator_and_following_variables.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ast: |
4848
CatchBreakNode
4949
attributes:
5050
breakID = org.truffleruby.language.control.BreakID@...
51-
flags = 1
51+
flags = 0
5252
isWhile = false
5353
children:
5454
body =

spec/truffle/parsing/fixtures/for/multi_assignment/with_preceding_variables_and_implicit_rest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ast: |
4848
CatchBreakNode
4949
attributes:
5050
breakID = org.truffleruby.language.control.BreakID@...
51-
flags = 1
51+
flags = 0
5252
isWhile = false
5353
children:
5454
body =

spec/truffle/parsing/fixtures/for/multi_assignment/with_preceding_variables_and_splat_operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ast: |
4848
CatchBreakNode
4949
attributes:
5050
breakID = org.truffleruby.language.control.BreakID@...
51-
flags = 1
51+
flags = 0
5252
isWhile = false
5353
children:
5454
body =

spec/truffle/parsing/fixtures/for/multi_assignment/with_splat_operator_and_following_variables.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ast: |
4848
CatchBreakNode
4949
attributes:
5050
breakID = org.truffleruby.language.control.BreakID@...
51-
flags = 1
51+
flags = 0
5252
isWhile = false
5353
children:
5454
body =

spec/truffle/parsing/fixtures/for/with_attribute_assignment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ast: |
4848
CatchBreakNode
4949
attributes:
5050
breakID = org.truffleruby.language.control.BreakID@...
51-
flags = 1
51+
flags = 0
5252
isWhile = false
5353
children:
5454
body =

spec/truffle/parsing/fixtures/for/with_class_variable.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ast: |
4848
CatchBreakNode
4949
attributes:
5050
breakID = org.truffleruby.language.control.BreakID@...
51-
flags = 1
51+
flags = 0
5252
isWhile = false
5353
children:
5454
body =

spec/truffle/parsing/fixtures/for/with_constant.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ast: |
4848
CatchBreakNode
4949
attributes:
5050
breakID = org.truffleruby.language.control.BreakID@...
51-
flags = 1
51+
flags = 0
5252
isWhile = false
5353
children:
5454
body =

0 commit comments

Comments
 (0)