diff options
author | Earlopain <[email protected]> | 2025-01-20 16:01:19 +0100 |
---|---|---|
committer | Kevin Newton <[email protected]> | 2025-03-18 13:36:53 -0400 |
commit | e3c846463092da8a7533740f9960fd626c749305 (patch) | |
tree | b1cd9ada9ccba9e0a2a3c8f752235dc9e99086a6 | |
parent | 94e12ffa39e46f5b1f80485e9b2e06a59cd69dac (diff) |
[ruby/prism] Only unnest parser mlhs nodes when no rest argument is provided
```
(a,), = []
PARSER====================
s(:masgn,
s(:mlhs,
s(:mlhs,
s(:lvasgn, :a))),
s(:array))
PRISM====================
s(:masgn,
s(:mlhs,
s(:lvasgn, :a)),
s(:array))
```
https://github.com/ruby/prism/commit/8aa1f4690e
-rw-r--r-- | lib/prism/translation/parser/compiler.rb | 2 | ||||
-rw-r--r-- | test/prism/fixtures/variables.txt | 2 | ||||
-rw-r--r-- | test/prism/snapshots/variables.txt | 488 |
3 files changed, 491 insertions, 1 deletions
diff --git a/lib/prism/translation/parser/compiler.rb b/lib/prism/translation/parser/compiler.rb index c08c781003..338c916eec 100644 --- a/lib/prism/translation/parser/compiler.rb +++ b/lib/prism/translation/parser/compiler.rb @@ -1372,7 +1372,7 @@ module Prism def visit_multi_write_node(node) elements = multi_target_elements(node) - if elements.length == 1 && elements.first.is_a?(MultiTargetNode) + if elements.length == 1 && elements.first.is_a?(MultiTargetNode) && !node.rest elements = multi_target_elements(elements.first) end diff --git a/test/prism/fixtures/variables.txt b/test/prism/fixtures/variables.txt index 1545c30c80..4f4dc6f9c8 100644 --- a/test/prism/fixtures/variables.txt +++ b/test/prism/fixtures/variables.txt @@ -45,3 +45,5 @@ Foo = 1, 2 (a; b; c) a, (b, c), d = [] + +(a,), = [] diff --git a/test/prism/snapshots/variables.txt b/test/prism/snapshots/variables.txt new file mode 100644 index 0000000000..2affa7ff8a --- /dev/null +++ b/test/prism/snapshots/variables.txt @@ -0,0 +1,488 @@ +@ ProgramNode (location: (1,0)-(49,10)) +├── flags: ∅ +├── locals: [:abc, :foo, :bar, :baz, :a, :b, :c, :d] +└── statements: + @ StatementsNode (location: (1,0)-(49,10)) + ├── flags: ∅ + └── body: (length: 26) + ├── @ ClassVariableReadNode (location: (1,0)-(1,5)) + │ ├── flags: newline + │ └── name: :@@abc + ├── @ ClassVariableWriteNode (location: (3,0)-(3,9)) + │ ├── flags: newline + │ ├── name: :@@abc + │ ├── name_loc: (3,0)-(3,5) = "@@abc" + │ ├── value: + │ │ @ IntegerNode (location: (3,8)-(3,9)) + │ │ ├── flags: static_literal, decimal + │ │ └── value: 1 + │ └── operator_loc: (3,6)-(3,7) = "=" + ├── @ MultiWriteNode (location: (5,0)-(5,16)) + │ ├── flags: newline + │ ├── lefts: (length: 2) + │ │ ├── @ ClassVariableTargetNode (location: (5,0)-(5,5)) + │ │ │ ├── flags: ∅ + │ │ │ └── name: :@@foo + │ │ └── @ ClassVariableTargetNode (location: (5,7)-(5,12)) + │ │ ├── flags: ∅ + │ │ └── name: :@@bar + │ ├── rest: ∅ + │ ├── rights: (length: 0) + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── operator_loc: (5,13)-(5,14) = "=" + │ └── value: + │ @ IntegerNode (location: (5,15)-(5,16)) + │ ├── flags: static_literal, decimal + │ └── value: 1 + ├── @ ClassVariableWriteNode (location: (7,0)-(7,12)) + │ ├── flags: newline + │ ├── name: :@@foo + │ ├── name_loc: (7,0)-(7,5) = "@@foo" + │ ├── value: + │ │ @ ArrayNode (location: (7,8)-(7,12)) + │ │ ├── flags: static_literal + │ │ ├── elements: (length: 2) + │ │ │ ├── @ IntegerNode (location: (7,8)-(7,9)) + │ │ │ │ ├── flags: static_literal, decimal + │ │ │ │ └── value: 1 + │ │ │ └── @ IntegerNode (location: (7,11)-(7,12)) + │ │ │ ├── flags: static_literal, decimal + │ │ │ └── value: 2 + │ │ ├── opening_loc: ∅ + │ │ └── closing_loc: ∅ + │ └── operator_loc: (7,6)-(7,7) = "=" + ├── @ GlobalVariableWriteNode (location: (9,0)-(9,8)) + │ ├── flags: newline + │ ├── name: :$abc + │ ├── name_loc: (9,0)-(9,4) = "$abc" + │ ├── value: + │ │ @ IntegerNode (location: (9,7)-(9,8)) + │ │ ├── flags: static_literal, decimal + │ │ └── value: 1 + │ └── operator_loc: (9,5)-(9,6) = "=" + ├── @ GlobalVariableReadNode (location: (11,0)-(11,4)) + │ ├── flags: newline + │ └── name: :$abc + ├── @ InstanceVariableReadNode (location: (13,0)-(13,4)) + │ ├── flags: newline + │ └── name: :@abc + ├── @ InstanceVariableWriteNode (location: (15,0)-(15,8)) + │ ├── flags: newline + │ ├── name: :@abc + │ ├── name_loc: (15,0)-(15,4) = "@abc" + │ ├── value: + │ │ @ IntegerNode (location: (15,7)-(15,8)) + │ │ ├── flags: static_literal, decimal + │ │ └── value: 1 + │ └── operator_loc: (15,5)-(15,6) = "=" + ├── @ CallNode (location: (17,0)-(17,1)) + │ ├── flags: newline, variable_call, ignore_visibility + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :a + │ ├── message_loc: (17,0)-(17,1) = "a" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── @ LocalVariableWriteNode (location: (19,0)-(19,7)) + │ ├── flags: newline + │ ├── name: :abc + │ ├── depth: 0 + │ ├── name_loc: (19,0)-(19,3) = "abc" + │ ├── value: + │ │ @ IntegerNode (location: (19,6)-(19,7)) + │ │ ├── flags: static_literal, decimal + │ │ └── value: 1 + │ └── operator_loc: (19,4)-(19,5) = "=" + ├── @ MultiWriteNode (location: (21,0)-(21,14)) + │ ├── flags: newline + │ ├── lefts: (length: 2) + │ │ ├── @ GlobalVariableTargetNode (location: (21,0)-(21,4)) + │ │ │ ├── flags: ∅ + │ │ │ └── name: :$foo + │ │ └── @ GlobalVariableTargetNode (location: (21,6)-(21,10)) + │ │ ├── flags: ∅ + │ │ └── name: :$bar + │ ├── rest: ∅ + │ ├── rights: (length: 0) + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── operator_loc: (21,11)-(21,12) = "=" + │ └── value: + │ @ IntegerNode (location: (21,13)-(21,14)) + │ ├── flags: static_literal, decimal + │ └── value: 1 + ├── @ GlobalVariableWriteNode (location: (23,0)-(23,11)) + │ ├── flags: newline + │ ├── name: :$foo + │ ├── name_loc: (23,0)-(23,4) = "$foo" + │ ├── value: + │ │ @ ArrayNode (location: (23,7)-(23,11)) + │ │ ├── flags: static_literal + │ │ ├── elements: (length: 2) + │ │ │ ├── @ IntegerNode (location: (23,7)-(23,8)) + │ │ │ │ ├── flags: static_literal, decimal + │ │ │ │ └── value: 1 + │ │ │ └── @ IntegerNode (location: (23,10)-(23,11)) + │ │ │ ├── flags: static_literal, decimal + │ │ │ └── value: 2 + │ │ ├── opening_loc: ∅ + │ │ └── closing_loc: ∅ + │ └── operator_loc: (23,5)-(23,6) = "=" + ├── @ MultiWriteNode (location: (25,0)-(25,14)) + │ ├── flags: newline + │ ├── lefts: (length: 2) + │ │ ├── @ InstanceVariableTargetNode (location: (25,0)-(25,4)) + │ │ │ ├── flags: ∅ + │ │ │ └── name: :@foo + │ │ └── @ InstanceVariableTargetNode (location: (25,6)-(25,10)) + │ │ ├── flags: ∅ + │ │ └── name: :@bar + │ ├── rest: ∅ + │ ├── rights: (length: 0) + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── operator_loc: (25,11)-(25,12) = "=" + │ └── value: + │ @ IntegerNode (location: (25,13)-(25,14)) + │ ├── flags: static_literal, decimal + │ └── value: 1 + ├── @ InstanceVariableWriteNode (location: (27,0)-(27,11)) + │ ├── flags: newline + │ ├── name: :@foo + │ ├── name_loc: (27,0)-(27,4) = "@foo" + │ ├── value: + │ │ @ ArrayNode (location: (27,7)-(27,11)) + │ │ ├── flags: static_literal + │ │ ├── elements: (length: 2) + │ │ │ ├── @ IntegerNode (location: (27,7)-(27,8)) + │ │ │ │ ├── flags: static_literal, decimal + │ │ │ │ └── value: 1 + │ │ │ └── @ IntegerNode (location: (27,10)-(27,11)) + │ │ │ ├── flags: static_literal, decimal + │ │ │ └── value: 2 + │ │ ├── opening_loc: ∅ + │ │ └── closing_loc: ∅ + │ └── operator_loc: (27,5)-(27,6) = "=" + ├── @ LocalVariableWriteNode (location: (29,0)-(29,7)) + │ ├── flags: newline + │ ├── name: :foo + │ ├── depth: 0 + │ ├── name_loc: (29,0)-(29,3) = "foo" + │ ├── value: + │ │ @ IntegerNode (location: (29,6)-(29,7)) + │ │ ├── flags: static_literal, decimal + │ │ └── value: 1 + │ └── operator_loc: (29,4)-(29,5) = "=" + ├── @ LocalVariableWriteNode (location: (29,9)-(29,19)) + │ ├── flags: newline + │ ├── name: :foo + │ ├── depth: 0 + │ ├── name_loc: (29,9)-(29,12) = "foo" + │ ├── value: + │ │ @ ArrayNode (location: (29,15)-(29,19)) + │ │ ├── flags: static_literal + │ │ ├── elements: (length: 2) + │ │ │ ├── @ IntegerNode (location: (29,15)-(29,16)) + │ │ │ │ ├── flags: static_literal, decimal + │ │ │ │ └── value: 1 + │ │ │ └── @ IntegerNode (location: (29,18)-(29,19)) + │ │ │ ├── flags: static_literal, decimal + │ │ │ └── value: 2 + │ │ ├── opening_loc: ∅ + │ │ └── closing_loc: ∅ + │ └── operator_loc: (29,13)-(29,14) = "=" + ├── @ LocalVariableWriteNode (location: (31,0)-(31,10)) + │ ├── flags: newline + │ ├── name: :foo + │ ├── depth: 0 + │ ├── name_loc: (31,0)-(31,3) = "foo" + │ ├── value: + │ │ @ ArrayNode (location: (31,6)-(31,10)) + │ │ ├── flags: static_literal + │ │ ├── elements: (length: 2) + │ │ │ ├── @ IntegerNode (location: (31,6)-(31,7)) + │ │ │ │ ├── flags: static_literal, decimal + │ │ │ │ └── value: 1 + │ │ │ └── @ IntegerNode (location: (31,9)-(31,10)) + │ │ │ ├── flags: static_literal, decimal + │ │ │ └── value: 2 + │ │ ├── opening_loc: ∅ + │ │ └── closing_loc: ∅ + │ └── operator_loc: (31,4)-(31,5) = "=" + ├── @ MultiWriteNode (location: (33,0)-(33,13)) + │ ├── flags: newline + │ ├── lefts: (length: 1) + │ │ └── @ LocalVariableTargetNode (location: (33,0)-(33,3)) + │ │ ├── flags: ∅ + │ │ ├── name: :foo + │ │ └── depth: 0 + │ ├── rest: + │ │ @ SplatNode (location: (33,5)-(33,6)) + │ │ ├── flags: ∅ + │ │ ├── operator_loc: (33,5)-(33,6) = "*" + │ │ └── expression: ∅ + │ ├── rights: (length: 0) + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── operator_loc: (33,7)-(33,8) = "=" + │ └── value: + │ @ ArrayNode (location: (33,9)-(33,13)) + │ ├── flags: static_literal + │ ├── elements: (length: 2) + │ │ ├── @ IntegerNode (location: (33,9)-(33,10)) + │ │ │ ├── flags: static_literal, decimal + │ │ │ └── value: 1 + │ │ └── @ IntegerNode (location: (33,12)-(33,13)) + │ │ ├── flags: static_literal, decimal + │ │ └── value: 2 + │ ├── opening_loc: ∅ + │ └── closing_loc: ∅ + ├── @ MultiWriteNode (location: (35,0)-(35,11)) + │ ├── flags: newline + │ ├── lefts: (length: 1) + │ │ └── @ LocalVariableTargetNode (location: (35,0)-(35,3)) + │ │ ├── flags: ∅ + │ │ ├── name: :foo + │ │ └── depth: 0 + │ ├── rest: + │ │ @ ImplicitRestNode (location: (35,3)-(35,4)) + │ │ └── flags: ∅ + │ ├── rights: (length: 0) + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── operator_loc: (35,5)-(35,6) = "=" + │ └── value: + │ @ ArrayNode (location: (35,7)-(35,11)) + │ ├── flags: static_literal + │ ├── elements: (length: 2) + │ │ ├── @ IntegerNode (location: (35,7)-(35,8)) + │ │ │ ├── flags: static_literal, decimal + │ │ │ └── value: 1 + │ │ └── @ IntegerNode (location: (35,10)-(35,11)) + │ │ ├── flags: static_literal, decimal + │ │ └── value: 2 + │ ├── opening_loc: ∅ + │ └── closing_loc: ∅ + ├── @ MultiWriteNode (location: (37,0)-(37,16)) + │ ├── flags: newline + │ ├── lefts: (length: 1) + │ │ └── @ LocalVariableTargetNode (location: (37,0)-(37,3)) + │ │ ├── flags: ∅ + │ │ ├── name: :foo + │ │ └── depth: 0 + │ ├── rest: + │ │ @ SplatNode (location: (37,5)-(37,9)) + │ │ ├── flags: ∅ + │ │ ├── operator_loc: (37,5)-(37,6) = "*" + │ │ └── expression: + │ │ @ LocalVariableTargetNode (location: (37,6)-(37,9)) + │ │ ├── flags: ∅ + │ │ ├── name: :bar + │ │ └── depth: 0 + │ ├── rights: (length: 0) + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── operator_loc: (37,10)-(37,11) = "=" + │ └── value: + │ @ ArrayNode (location: (37,12)-(37,16)) + │ ├── flags: static_literal + │ ├── elements: (length: 2) + │ │ ├── @ IntegerNode (location: (37,12)-(37,13)) + │ │ │ ├── flags: static_literal, decimal + │ │ │ └── value: 1 + │ │ └── @ IntegerNode (location: (37,15)-(37,16)) + │ │ ├── flags: static_literal, decimal + │ │ └── value: 2 + │ ├── opening_loc: ∅ + │ └── closing_loc: ∅ + ├── @ MultiWriteNode (location: (39,0)-(39,27)) + │ ├── flags: newline + │ ├── lefts: (length: 2) + │ │ ├── @ LocalVariableTargetNode (location: (39,0)-(39,3)) + │ │ │ ├── flags: ∅ + │ │ │ ├── name: :foo + │ │ │ └── depth: 0 + │ │ └── @ MultiTargetNode (location: (39,5)-(39,15)) + │ │ ├── flags: ∅ + │ │ ├── lefts: (length: 2) + │ │ │ ├── @ LocalVariableTargetNode (location: (39,6)-(39,9)) + │ │ │ │ ├── flags: ∅ + │ │ │ │ ├── name: :bar + │ │ │ │ └── depth: 0 + │ │ │ └── @ LocalVariableTargetNode (location: (39,11)-(39,14)) + │ │ │ ├── flags: ∅ + │ │ │ ├── name: :baz + │ │ │ └── depth: 0 + │ │ ├── rest: ∅ + │ │ ├── rights: (length: 0) + │ │ ├── lparen_loc: (39,5)-(39,6) = "(" + │ │ └── rparen_loc: (39,14)-(39,15) = ")" + │ ├── rest: ∅ + │ ├── rights: (length: 0) + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── operator_loc: (39,16)-(39,17) = "=" + │ └── value: + │ @ ArrayNode (location: (39,18)-(39,27)) + │ ├── flags: ∅ + │ ├── elements: (length: 2) + │ │ ├── @ IntegerNode (location: (39,18)-(39,19)) + │ │ │ ├── flags: static_literal, decimal + │ │ │ └── value: 1 + │ │ └── @ ArrayNode (location: (39,21)-(39,27)) + │ │ ├── flags: static_literal + │ │ ├── elements: (length: 2) + │ │ │ ├── @ IntegerNode (location: (39,22)-(39,23)) + │ │ │ │ ├── flags: static_literal, decimal + │ │ │ │ └── value: 2 + │ │ │ └── @ IntegerNode (location: (39,25)-(39,26)) + │ │ │ ├── flags: static_literal, decimal + │ │ │ └── value: 3 + │ │ ├── opening_loc: (39,21)-(39,22) = "[" + │ │ └── closing_loc: (39,26)-(39,27) = "]" + │ ├── opening_loc: ∅ + │ └── closing_loc: ∅ + ├── @ LocalVariableWriteNode (location: (41,0)-(41,10)) + │ ├── flags: newline + │ ├── name: :foo + │ ├── depth: 0 + │ ├── name_loc: (41,0)-(41,3) = "foo" + │ ├── value: + │ │ @ ArrayNode (location: (41,6)-(41,10)) + │ │ ├── flags: contains_splat + │ │ ├── elements: (length: 1) + │ │ │ └── @ SplatNode (location: (41,6)-(41,10)) + │ │ │ ├── flags: ∅ + │ │ │ ├── operator_loc: (41,6)-(41,7) = "*" + │ │ │ └── expression: + │ │ │ @ LocalVariableReadNode (location: (41,7)-(41,10)) + │ │ │ ├── flags: ∅ + │ │ │ ├── name: :bar + │ │ │ └── depth: 0 + │ │ ├── opening_loc: ∅ + │ │ └── closing_loc: ∅ + │ └── operator_loc: (41,4)-(41,5) = "=" + ├── @ ConstantWriteNode (location: (43,0)-(43,10)) + │ ├── flags: newline + │ ├── name: :Foo + │ ├── name_loc: (43,0)-(43,3) = "Foo" + │ ├── value: + │ │ @ ArrayNode (location: (43,6)-(43,10)) + │ │ ├── flags: static_literal + │ │ ├── elements: (length: 2) + │ │ │ ├── @ IntegerNode (location: (43,6)-(43,7)) + │ │ │ │ ├── flags: static_literal, decimal + │ │ │ │ └── value: 1 + │ │ │ └── @ IntegerNode (location: (43,9)-(43,10)) + │ │ │ ├── flags: static_literal, decimal + │ │ │ └── value: 2 + │ │ ├── opening_loc: ∅ + │ │ └── closing_loc: ∅ + │ └── operator_loc: (43,4)-(43,5) = "=" + ├── @ ParenthesesNode (location: (45,0)-(45,9)) + │ ├── flags: newline + │ ├── body: + │ │ @ StatementsNode (location: (45,1)-(45,8)) + │ │ ├── flags: ∅ + │ │ └── body: (length: 3) + │ │ ├── @ CallNode (location: (45,1)-(45,2)) + │ │ │ ├── flags: newline, variable_call, ignore_visibility + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :a + │ │ │ ├── message_loc: (45,1)-(45,2) = "a" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ ├── @ CallNode (location: (45,4)-(45,5)) + │ │ │ ├── flags: newline, variable_call, ignore_visibility + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :b + │ │ │ ├── message_loc: (45,4)-(45,5) = "b" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ └── @ CallNode (location: (45,7)-(45,8)) + │ │ ├── flags: newline, variable_call, ignore_visibility + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :c + │ │ ├── message_loc: (45,7)-(45,8) = "c" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── opening_loc: (45,0)-(45,1) = "(" + │ └── closing_loc: (45,8)-(45,9) = ")" + ├── @ MultiWriteNode (location: (47,0)-(47,17)) + │ ├── flags: newline + │ ├── lefts: (length: 3) + │ │ ├── @ LocalVariableTargetNode (location: (47,0)-(47,1)) + │ │ │ ├── flags: ∅ + │ │ │ ├── name: :a + │ │ │ └── depth: 0 + │ │ ├── @ MultiTargetNode (location: (47,3)-(47,9)) + │ │ │ ├── flags: ∅ + │ │ │ ├── lefts: (length: 2) + │ │ │ │ ├── @ LocalVariableTargetNode (location: (47,4)-(47,5)) + │ │ │ │ │ ├── flags: ∅ + │ │ │ │ │ ├── name: :b + │ │ │ │ │ └── depth: 0 + │ │ │ │ └── @ LocalVariableTargetNode (location: (47,7)-(47,8)) + │ │ │ │ ├── flags: ∅ + │ │ │ │ ├── name: :c + │ │ │ │ └── depth: 0 + │ │ │ ├── rest: ∅ + │ │ │ ├── rights: (length: 0) + │ │ │ ├── lparen_loc: (47,3)-(47,4) = "(" + │ │ │ └── rparen_loc: (47,8)-(47,9) = ")" + │ │ └── @ LocalVariableTargetNode (location: (47,11)-(47,12)) + │ │ ├── flags: ∅ + │ │ ├── name: :d + │ │ └── depth: 0 + │ ├── rest: ∅ + │ ├── rights: (length: 0) + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── operator_loc: (47,13)-(47,14) = "=" + │ └── value: + │ @ ArrayNode (location: (47,15)-(47,17)) + │ ├── flags: static_literal + │ ├── elements: (length: 0) + │ ├── opening_loc: (47,15)-(47,16) = "[" + │ └── closing_loc: (47,16)-(47,17) = "]" + └── @ MultiWriteNode (location: (49,0)-(49,10)) + ├── flags: newline + ├── lefts: (length: 1) + │ └── @ MultiTargetNode (location: (49,0)-(49,4)) + │ ├── flags: ∅ + │ ├── lefts: (length: 1) + │ │ └── @ LocalVariableTargetNode (location: (49,1)-(49,2)) + │ │ ├── flags: ∅ + │ │ ├── name: :a + │ │ └── depth: 0 + │ ├── rest: + │ │ @ ImplicitRestNode (location: (49,2)-(49,3)) + │ │ └── flags: ∅ + │ ├── rights: (length: 0) + │ ├── lparen_loc: (49,0)-(49,1) = "(" + │ └── rparen_loc: (49,3)-(49,4) = ")" + ├── rest: + │ @ ImplicitRestNode (location: (49,4)-(49,5)) + │ └── flags: ∅ + ├── rights: (length: 0) + ├── lparen_loc: ∅ + ├── rparen_loc: ∅ + ├── operator_loc: (49,6)-(49,7) = "=" + └── value: + @ ArrayNode (location: (49,8)-(49,10)) + ├── flags: static_literal + ├── elements: (length: 0) + ├── opening_loc: (49,8)-(49,9) = "[" + └── closing_loc: (49,9)-(49,10) = "]" |