diff --git a/lib/prism/translation/parser/lexer.rb b/lib/prism/translation/parser/lexer.rb index d50305e632..01f6041d07 100644 --- a/lib/prism/translation/parser/lexer.rb +++ b/lib/prism/translation/parser/lexer.rb @@ -197,7 +197,7 @@ class Lexer # The following token types are listed as those classified as `tLPAREN`. LPAREN_CONVERSION_TOKEN_TYPES = [ :kBREAK, :kCASE, :tDIVIDE, :kFOR, :kIF, :kNEXT, :kRETURN, :kUNTIL, :kWHILE, :tAMPER, :tANDOP, :tBANG, :tCOMMA, :tDOT2, :tDOT3, - :tEQL, :tLPAREN, :tLPAREN2, :tLSHFT, :tNL, :tOP_ASGN, :tOROP, :tPIPE, :tSEMI, :tSTRING_DBEG, :tUMINUS, :tUPLUS + :tEQL, :tLPAREN, :tLPAREN2, :tLPAREN_ARG, :tLSHFT, :tNL, :tOP_ASGN, :tOROP, :tPIPE, :tSEMI, :tSTRING_DBEG, :tUMINUS, :tUPLUS ] # Heredocs are complex and require us to keep track of a bit of info to refer to later diff --git a/test/prism/fixtures/ranges.txt b/test/prism/fixtures/ranges.txt index e2e4136ae9..87eac6d241 100644 --- a/test/prism/fixtures/ranges.txt +++ b/test/prism/fixtures/ranges.txt @@ -2,6 +2,8 @@ (..2) +foo ((1..1)) + 1...2 foo[...2] diff --git a/test/prism/snapshots/ranges.txt b/test/prism/snapshots/ranges.txt index 81dbe3d901..59af913fa4 100644 --- a/test/prism/snapshots/ranges.txt +++ b/test/prism/snapshots/ranges.txt @@ -1,10 +1,10 @@ -@ ProgramNode (location: (1,0)-(49,7)) +@ ProgramNode (location: (1,0)-(51,7)) ├── flags: ∅ ├── locals: [] └── statements: - @ StatementsNode (location: (1,0)-(49,7)) + @ StatementsNode (location: (1,0)-(51,7)) ├── flags: ∅ - └── body: (length: 25) + └── body: (length: 26) ├── @ ParenthesesNode (location: (1,0)-(1,6)) │ ├── flags: newline │ ├── body: @@ -37,188 +37,212 @@ │ │ └── operator_loc: (3,1)-(3,3) = ".." │ ├── opening_loc: (3,0)-(3,1) = "(" │ └── closing_loc: (3,4)-(3,5) = ")" - ├── @ RangeNode (location: (5,0)-(5,5)) + ├── @ CallNode (location: (5,0)-(5,12)) + │ ├── flags: newline, ignore_visibility + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :foo + │ ├── message_loc: (5,0)-(5,3) = "foo" + │ ├── opening_loc: ∅ + │ ├── arguments: + │ │ @ ArgumentsNode (location: (5,4)-(5,12)) + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ ParenthesesNode (location: (5,4)-(5,12)) + │ │ ├── flags: ∅ + │ │ ├── body: + │ │ │ @ StatementsNode (location: (5,5)-(5,11)) + │ │ │ ├── flags: ∅ + │ │ │ └── body: (length: 1) + │ │ │ └── @ ParenthesesNode (location: (5,5)-(5,11)) + │ │ │ ├── flags: newline + │ │ │ ├── body: + │ │ │ │ @ StatementsNode (location: (5,6)-(5,10)) + │ │ │ │ ├── flags: ∅ + │ │ │ │ └── body: (length: 1) + │ │ │ │ └── @ RangeNode (location: (5,6)-(5,10)) + │ │ │ │ ├── flags: newline, static_literal + │ │ │ │ ├── left: + │ │ │ │ │ @ IntegerNode (location: (5,6)-(5,7)) + │ │ │ │ │ ├── flags: static_literal, decimal + │ │ │ │ │ └── value: 1 + │ │ │ │ ├── right: + │ │ │ │ │ @ IntegerNode (location: (5,9)-(5,10)) + │ │ │ │ │ ├── flags: static_literal, decimal + │ │ │ │ │ └── value: 1 + │ │ │ │ └── operator_loc: (5,7)-(5,9) = ".." + │ │ │ ├── opening_loc: (5,5)-(5,6) = "(" + │ │ │ └── closing_loc: (5,10)-(5,11) = ")" + │ │ ├── opening_loc: (5,4)-(5,5) = "(" + │ │ └── closing_loc: (5,11)-(5,12) = ")" + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── @ RangeNode (location: (7,0)-(7,5)) │ ├── flags: newline, static_literal, exclude_end │ ├── left: - │ │ @ IntegerNode (location: (5,0)-(5,1)) + │ │ @ IntegerNode (location: (7,0)-(7,1)) │ │ ├── flags: static_literal, decimal │ │ └── value: 1 │ ├── right: - │ │ @ IntegerNode (location: (5,4)-(5,5)) + │ │ @ IntegerNode (location: (7,4)-(7,5)) │ │ ├── flags: static_literal, decimal │ │ └── value: 2 - │ └── operator_loc: (5,1)-(5,4) = "..." - ├── @ CallNode (location: (7,0)-(7,9)) + │ └── operator_loc: (7,1)-(7,4) = "..." + ├── @ CallNode (location: (9,0)-(9,9)) │ ├── flags: newline │ ├── receiver: - │ │ @ CallNode (location: (7,0)-(7,3)) + │ │ @ CallNode (location: (9,0)-(9,3)) │ │ ├── flags: variable_call, ignore_visibility │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ │ │ ├── name: :foo - │ │ ├── message_loc: (7,0)-(7,3) = "foo" + │ │ ├── message_loc: (9,0)-(9,3) = "foo" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ │ │ └── block: ∅ │ ├── call_operator_loc: ∅ │ ├── name: :[] - │ ├── message_loc: (7,3)-(7,9) = "[...2]" - │ ├── opening_loc: (7,3)-(7,4) = "[" + │ ├── message_loc: (9,3)-(9,9) = "[...2]" + │ ├── opening_loc: (9,3)-(9,4) = "[" │ ├── arguments: - │ │ @ ArgumentsNode (location: (7,4)-(7,8)) + │ │ @ ArgumentsNode (location: (9,4)-(9,8)) │ │ ├── flags: ∅ │ │ └── arguments: (length: 1) - │ │ └── @ RangeNode (location: (7,4)-(7,8)) + │ │ └── @ RangeNode (location: (9,4)-(9,8)) │ │ ├── flags: static_literal, exclude_end │ │ ├── left: ∅ │ │ ├── right: - │ │ │ @ IntegerNode (location: (7,7)-(7,8)) + │ │ │ @ IntegerNode (location: (9,7)-(9,8)) │ │ │ ├── flags: static_literal, decimal │ │ │ └── value: 2 - │ │ └── operator_loc: (7,4)-(7,7) = "..." - │ ├── closing_loc: (7,8)-(7,9) = "]" + │ │ └── operator_loc: (9,4)-(9,7) = "..." + │ ├── closing_loc: (9,8)-(9,9) = "]" │ └── block: ∅ - ├── @ HashNode (location: (9,0)-(9,15)) + ├── @ HashNode (location: (11,0)-(11,15)) │ ├── flags: newline - │ ├── opening_loc: (9,0)-(9,1) = "{" + │ ├── opening_loc: (11,0)-(11,1) = "{" │ ├── elements: (length: 1) - │ │ └── @ AssocNode (location: (9,2)-(9,13)) + │ │ └── @ AssocNode (location: (11,2)-(11,13)) │ │ ├── flags: ∅ │ │ ├── key: - │ │ │ @ SymbolNode (location: (9,2)-(9,6)) + │ │ │ @ SymbolNode (location: (11,2)-(11,6)) │ │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ │ ├── opening_loc: ∅ - │ │ │ ├── value_loc: (9,2)-(9,5) = "foo" - │ │ │ ├── closing_loc: (9,5)-(9,6) = ":" + │ │ │ ├── value_loc: (11,2)-(11,5) = "foo" + │ │ │ ├── closing_loc: (11,5)-(11,6) = ":" │ │ │ └── unescaped: "foo" │ │ ├── value: - │ │ │ @ RangeNode (location: (9,7)-(9,13)) + │ │ │ @ RangeNode (location: (11,7)-(11,13)) │ │ │ ├── flags: exclude_end │ │ │ ├── left: ∅ │ │ │ ├── right: - │ │ │ │ @ CallNode (location: (9,10)-(9,13)) + │ │ │ │ @ CallNode (location: (11,10)-(11,13)) │ │ │ │ ├── flags: variable_call, ignore_visibility │ │ │ │ ├── receiver: ∅ │ │ │ │ ├── call_operator_loc: ∅ │ │ │ │ ├── name: :bar - │ │ │ │ ├── message_loc: (9,10)-(9,13) = "bar" + │ │ │ │ ├── message_loc: (11,10)-(11,13) = "bar" │ │ │ │ ├── opening_loc: ∅ │ │ │ │ ├── arguments: ∅ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── block: ∅ - │ │ │ └── operator_loc: (9,7)-(9,10) = "..." + │ │ │ └── operator_loc: (11,7)-(11,10) = "..." │ │ └── operator_loc: ∅ - │ └── closing_loc: (9,14)-(9,15) = "}" - ├── @ ParenthesesNode (location: (11,0)-(11,6)) + │ └── closing_loc: (11,14)-(11,15) = "}" + ├── @ ParenthesesNode (location: (13,0)-(13,6)) │ ├── flags: newline │ ├── body: - │ │ @ StatementsNode (location: (11,1)-(11,5)) + │ │ @ StatementsNode (location: (13,1)-(13,5)) │ │ ├── flags: ∅ │ │ └── body: (length: 1) - │ │ └── @ RangeNode (location: (11,1)-(11,5)) + │ │ └── @ RangeNode (location: (13,1)-(13,5)) │ │ ├── flags: newline, static_literal, exclude_end │ │ ├── left: - │ │ │ @ IntegerNode (location: (11,1)-(11,2)) + │ │ │ @ IntegerNode (location: (13,1)-(13,2)) │ │ │ ├── flags: static_literal, decimal │ │ │ └── value: 1 │ │ ├── right: ∅ - │ │ └── operator_loc: (11,2)-(11,5) = "..." - │ ├── opening_loc: (11,0)-(11,1) = "(" - │ └── closing_loc: (11,5)-(11,6) = ")" - ├── @ RangeNode (location: (13,0)-(13,4)) + │ │ └── operator_loc: (13,2)-(13,5) = "..." + │ ├── opening_loc: (13,0)-(13,1) = "(" + │ └── closing_loc: (13,5)-(13,6) = ")" + ├── @ RangeNode (location: (15,0)-(15,4)) │ ├── flags: newline, static_literal │ ├── left: - │ │ @ IntegerNode (location: (13,0)-(13,1)) + │ │ @ IntegerNode (location: (15,0)-(15,1)) │ │ ├── flags: static_literal, decimal │ │ └── value: 1 │ ├── right: - │ │ @ IntegerNode (location: (13,3)-(13,4)) + │ │ @ IntegerNode (location: (15,3)-(15,4)) │ │ ├── flags: static_literal, decimal │ │ └── value: 2 - │ └── operator_loc: (13,1)-(13,3) = ".." - ├── @ HashNode (location: (15,0)-(15,14)) + │ └── operator_loc: (15,1)-(15,3) = ".." + ├── @ HashNode (location: (17,0)-(17,14)) │ ├── flags: newline - │ ├── opening_loc: (15,0)-(15,1) = "{" + │ ├── opening_loc: (17,0)-(17,1) = "{" │ ├── elements: (length: 1) - │ │ └── @ AssocNode (location: (15,2)-(15,12)) + │ │ └── @ AssocNode (location: (17,2)-(17,12)) │ │ ├── flags: ∅ │ │ ├── key: - │ │ │ @ SymbolNode (location: (15,2)-(15,6)) + │ │ │ @ SymbolNode (location: (17,2)-(17,6)) │ │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ │ ├── opening_loc: ∅ - │ │ │ ├── value_loc: (15,2)-(15,5) = "foo" - │ │ │ ├── closing_loc: (15,5)-(15,6) = ":" + │ │ │ ├── value_loc: (17,2)-(17,5) = "foo" + │ │ │ ├── closing_loc: (17,5)-(17,6) = ":" │ │ │ └── unescaped: "foo" │ │ ├── value: - │ │ │ @ RangeNode (location: (15,7)-(15,12)) + │ │ │ @ RangeNode (location: (17,7)-(17,12)) │ │ │ ├── flags: ∅ │ │ │ ├── left: ∅ │ │ │ ├── right: - │ │ │ │ @ CallNode (location: (15,9)-(15,12)) + │ │ │ │ @ CallNode (location: (17,9)-(17,12)) │ │ │ │ ├── flags: variable_call, ignore_visibility │ │ │ │ ├── receiver: ∅ │ │ │ │ ├── call_operator_loc: ∅ │ │ │ │ ├── name: :bar - │ │ │ │ ├── message_loc: (15,9)-(15,12) = "bar" + │ │ │ │ ├── message_loc: (17,9)-(17,12) = "bar" │ │ │ │ ├── opening_loc: ∅ │ │ │ │ ├── arguments: ∅ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── block: ∅ - │ │ │ └── operator_loc: (15,7)-(15,9) = ".." + │ │ │ └── operator_loc: (17,7)-(17,9) = ".." │ │ └── operator_loc: ∅ - │ └── closing_loc: (15,13)-(15,14) = "}" - ├── @ ParenthesesNode (location: (17,0)-(17,5)) + │ └── closing_loc: (17,13)-(17,14) = "}" + ├── @ ParenthesesNode (location: (19,0)-(19,5)) │ ├── flags: newline │ ├── body: - │ │ @ StatementsNode (location: (17,1)-(17,4)) + │ │ @ StatementsNode (location: (19,1)-(19,4)) │ │ ├── flags: ∅ │ │ └── body: (length: 1) - │ │ └── @ RangeNode (location: (17,1)-(17,4)) + │ │ └── @ RangeNode (location: (19,1)-(19,4)) │ │ ├── flags: newline, static_literal │ │ ├── left: - │ │ │ @ IntegerNode (location: (17,1)-(17,2)) + │ │ │ @ IntegerNode (location: (19,1)-(19,2)) │ │ │ ├── flags: static_literal, decimal │ │ │ └── value: 1 │ │ ├── right: ∅ - │ │ └── operator_loc: (17,2)-(17,4) = ".." - │ ├── opening_loc: (17,0)-(17,1) = "(" - │ └── closing_loc: (17,4)-(17,5) = ")" - ├── @ RangeNode (location: (19,0)-(19,8)) + │ │ └── operator_loc: (19,2)-(19,4) = ".." + │ ├── opening_loc: (19,0)-(19,1) = "(" + │ └── closing_loc: (19,4)-(19,5) = ")" + ├── @ RangeNode (location: (21,0)-(21,8)) │ ├── flags: newline │ ├── left: - │ │ @ IntegerNode (location: (19,0)-(19,1)) + │ │ @ IntegerNode (location: (21,0)-(21,1)) │ │ ├── flags: static_literal, decimal │ │ └── value: 1 │ ├── right: - │ │ @ RangeNode (location: (19,5)-(19,8)) + │ │ @ RangeNode (location: (21,5)-(21,8)) │ │ ├── flags: static_literal │ │ ├── left: ∅ │ │ ├── right: - │ │ │ @ IntegerNode (location: (19,7)-(19,8)) + │ │ │ @ IntegerNode (location: (21,7)-(21,8)) │ │ │ ├── flags: static_literal, decimal │ │ │ └── value: 1 - │ │ └── operator_loc: (19,5)-(19,7) = ".." - │ └── operator_loc: (19,2)-(19,4) = ".." - ├── @ AndNode (location: (21,0)-(21,8)) + │ │ └── operator_loc: (21,5)-(21,7) = ".." + │ └── operator_loc: (21,2)-(21,4) = ".." + ├── @ AndNode (location: (23,0)-(23,8)) │ ├── flags: newline │ ├── left: - │ │ @ RangeNode (location: (21,0)-(21,3)) - │ │ ├── flags: static_literal - │ │ ├── left: - │ │ │ @ IntegerNode (location: (21,0)-(21,1)) - │ │ │ ├── flags: static_literal, decimal - │ │ │ └── value: 1 - │ │ ├── right: ∅ - │ │ └── operator_loc: (21,1)-(21,3) = ".." - │ ├── right: - │ │ @ IntegerNode (location: (21,7)-(21,8)) - │ │ ├── flags: static_literal, decimal - │ │ └── value: 2 - │ └── operator_loc: (21,4)-(21,6) = "&&" - ├── @ CallNode (location: (23,0)-(23,8)) - │ ├── flags: newline - │ ├── receiver: │ │ @ RangeNode (location: (23,0)-(23,3)) │ │ ├── flags: static_literal │ │ ├── left: @@ -227,19 +251,11 @@ │ │ │ └── value: 1 │ │ ├── right: ∅ │ │ └── operator_loc: (23,1)-(23,3) = ".." - │ ├── call_operator_loc: ∅ - │ ├── name: :== - │ ├── message_loc: (23,4)-(23,6) = "==" - │ ├── opening_loc: ∅ - │ ├── arguments: - │ │ @ ArgumentsNode (location: (23,7)-(23,8)) - │ │ ├── flags: ∅ - │ │ └── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (23,7)-(23,8)) - │ │ ├── flags: static_literal, decimal - │ │ └── value: 2 - │ ├── closing_loc: ∅ - │ └── block: ∅ + │ ├── right: + │ │ @ IntegerNode (location: (23,7)-(23,8)) + │ │ ├── flags: static_literal, decimal + │ │ └── value: 2 + │ └── operator_loc: (23,4)-(23,6) = "&&" ├── @ CallNode (location: (25,0)-(25,8)) │ ├── flags: newline │ ├── receiver: @@ -252,8 +268,8 @@ │ │ ├── right: ∅ │ │ └── operator_loc: (25,1)-(25,3) = ".." │ ├── call_operator_loc: ∅ - │ ├── name: :!= - │ ├── message_loc: (25,4)-(25,6) = "!=" + │ ├── name: :== + │ ├── message_loc: (25,4)-(25,6) = "==" │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (25,7)-(25,8)) @@ -264,7 +280,7 @@ │ │ └── value: 2 │ ├── closing_loc: ∅ │ └── block: ∅ - ├── @ CallNode (location: (27,0)-(27,9)) + ├── @ CallNode (location: (27,0)-(27,8)) │ ├── flags: newline │ ├── receiver: │ │ @ RangeNode (location: (27,0)-(27,3)) @@ -276,14 +292,14 @@ │ │ ├── right: ∅ │ │ └── operator_loc: (27,1)-(27,3) = ".." │ ├── call_operator_loc: ∅ - │ ├── name: :=== - │ ├── message_loc: (27,4)-(27,7) = "===" + │ ├── name: :!= + │ ├── message_loc: (27,4)-(27,6) = "!=" │ ├── opening_loc: ∅ │ ├── arguments: - │ │ @ ArgumentsNode (location: (27,8)-(27,9)) + │ │ @ ArgumentsNode (location: (27,7)-(27,8)) │ │ ├── flags: ∅ │ │ └── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (27,8)-(27,9)) + │ │ └── @ IntegerNode (location: (27,7)-(27,8)) │ │ ├── flags: static_literal, decimal │ │ └── value: 2 │ ├── closing_loc: ∅ @@ -300,8 +316,8 @@ │ │ ├── right: ∅ │ │ └── operator_loc: (29,1)-(29,3) = ".." │ ├── call_operator_loc: ∅ - │ ├── name: :<=> - │ ├── message_loc: (29,4)-(29,7) = "<=>" + │ ├── name: :=== + │ ├── message_loc: (29,4)-(29,7) = "===" │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (29,8)-(29,9)) @@ -312,7 +328,7 @@ │ │ └── value: 2 │ ├── closing_loc: ∅ │ └── block: ∅ - ├── @ CallNode (location: (31,0)-(31,8)) + ├── @ CallNode (location: (31,0)-(31,9)) │ ├── flags: newline │ ├── receiver: │ │ @ RangeNode (location: (31,0)-(31,3)) @@ -324,14 +340,14 @@ │ │ ├── right: ∅ │ │ └── operator_loc: (31,1)-(31,3) = ".." │ ├── call_operator_loc: ∅ - │ ├── name: :=~ - │ ├── message_loc: (31,4)-(31,6) = "=~" + │ ├── name: :<=> + │ ├── message_loc: (31,4)-(31,7) = "<=>" │ ├── opening_loc: ∅ │ ├── arguments: - │ │ @ ArgumentsNode (location: (31,7)-(31,8)) + │ │ @ ArgumentsNode (location: (31,8)-(31,9)) │ │ ├── flags: ∅ │ │ └── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (31,7)-(31,8)) + │ │ └── @ IntegerNode (location: (31,8)-(31,9)) │ │ ├── flags: static_literal, decimal │ │ └── value: 2 │ ├── closing_loc: ∅ @@ -348,8 +364,8 @@ │ │ ├── right: ∅ │ │ └── operator_loc: (33,1)-(33,3) = ".." │ ├── call_operator_loc: ∅ - │ ├── name: :!~ - │ ├── message_loc: (33,4)-(33,6) = "!~" + │ ├── name: :=~ + │ ├── message_loc: (33,4)-(33,6) = "=~" │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (33,7)-(33,8)) @@ -360,7 +376,7 @@ │ │ └── value: 2 │ ├── closing_loc: ∅ │ └── block: ∅ - ├── @ CallNode (location: (35,0)-(35,7)) + ├── @ CallNode (location: (35,0)-(35,8)) │ ├── flags: newline │ ├── receiver: │ │ @ RangeNode (location: (35,0)-(35,3)) @@ -372,14 +388,14 @@ │ │ ├── right: ∅ │ │ └── operator_loc: (35,1)-(35,3) = ".." │ ├── call_operator_loc: ∅ - │ ├── name: :< - │ ├── message_loc: (35,4)-(35,5) = "<" + │ ├── name: :!~ + │ ├── message_loc: (35,4)-(35,6) = "!~" │ ├── opening_loc: ∅ │ ├── arguments: - │ │ @ ArgumentsNode (location: (35,6)-(35,7)) + │ │ @ ArgumentsNode (location: (35,7)-(35,8)) │ │ ├── flags: ∅ │ │ └── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (35,6)-(35,7)) + │ │ └── @ IntegerNode (location: (35,7)-(35,8)) │ │ ├── flags: static_literal, decimal │ │ └── value: 2 │ ├── closing_loc: ∅ @@ -396,8 +412,8 @@ │ │ ├── right: ∅ │ │ └── operator_loc: (37,1)-(37,3) = ".." │ ├── call_operator_loc: ∅ - │ ├── name: :> - │ ├── message_loc: (37,4)-(37,5) = ">" + │ ├── name: :< + │ ├── message_loc: (37,4)-(37,5) = "<" │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (37,6)-(37,7)) @@ -408,7 +424,7 @@ │ │ └── value: 2 │ ├── closing_loc: ∅ │ └── block: ∅ - ├── @ CallNode (location: (39,0)-(39,8)) + ├── @ CallNode (location: (39,0)-(39,7)) │ ├── flags: newline │ ├── receiver: │ │ @ RangeNode (location: (39,0)-(39,3)) @@ -420,14 +436,14 @@ │ │ ├── right: ∅ │ │ └── operator_loc: (39,1)-(39,3) = ".." │ ├── call_operator_loc: ∅ - │ ├── name: :<= - │ ├── message_loc: (39,4)-(39,6) = "<=" + │ ├── name: :> + │ ├── message_loc: (39,4)-(39,5) = ">" │ ├── opening_loc: ∅ │ ├── arguments: - │ │ @ ArgumentsNode (location: (39,7)-(39,8)) + │ │ @ ArgumentsNode (location: (39,6)-(39,7)) │ │ ├── flags: ∅ │ │ └── arguments: (length: 1) - │ │ └── @ IntegerNode (location: (39,7)-(39,8)) + │ │ └── @ IntegerNode (location: (39,6)-(39,7)) │ │ ├── flags: static_literal, decimal │ │ └── value: 2 │ ├── closing_loc: ∅ @@ -444,8 +460,8 @@ │ │ ├── right: ∅ │ │ └── operator_loc: (41,1)-(41,3) = ".." │ ├── call_operator_loc: ∅ - │ ├── name: :>= - │ ├── message_loc: (41,4)-(41,6) = ">=" + │ ├── name: :<= + │ ├── message_loc: (41,4)-(41,6) = "<=" │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (41,7)-(41,8)) @@ -468,8 +484,8 @@ │ │ ├── right: ∅ │ │ └── operator_loc: (43,1)-(43,3) = ".." │ ├── call_operator_loc: ∅ - │ ├── name: :<< - │ ├── message_loc: (43,4)-(43,6) = "<<" + │ ├── name: :>= + │ ├── message_loc: (43,4)-(43,6) = ">=" │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (43,7)-(43,8)) @@ -492,8 +508,8 @@ │ │ ├── right: ∅ │ │ └── operator_loc: (45,1)-(45,3) = ".." │ ├── call_operator_loc: ∅ - │ ├── name: :>> - │ ├── message_loc: (45,4)-(45,6) = ">>" + │ ├── name: :<< + │ ├── message_loc: (45,4)-(45,6) = "<<" │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (45,7)-(45,8)) @@ -504,45 +520,69 @@ │ │ └── value: 2 │ ├── closing_loc: ∅ │ └── block: ∅ - ├── @ RangeNode (location: (47,0)-(47,7)) + ├── @ CallNode (location: (47,0)-(47,8)) + │ ├── flags: newline + │ ├── receiver: + │ │ @ RangeNode (location: (47,0)-(47,3)) + │ │ ├── flags: static_literal + │ │ ├── left: + │ │ │ @ IntegerNode (location: (47,0)-(47,1)) + │ │ │ ├── flags: static_literal, decimal + │ │ │ └── value: 1 + │ │ ├── right: ∅ + │ │ └── operator_loc: (47,1)-(47,3) = ".." + │ ├── call_operator_loc: ∅ + │ ├── name: :>> + │ ├── message_loc: (47,4)-(47,6) = ">>" + │ ├── opening_loc: ∅ + │ ├── arguments: + │ │ @ ArgumentsNode (location: (47,7)-(47,8)) + │ │ ├── flags: ∅ + │ │ └── arguments: (length: 1) + │ │ └── @ IntegerNode (location: (47,7)-(47,8)) + │ │ ├── flags: static_literal, decimal + │ │ └── value: 2 + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── @ RangeNode (location: (49,0)-(49,7)) │ ├── flags: newline │ ├── left: - │ │ @ IntegerNode (location: (47,0)-(47,1)) + │ │ @ IntegerNode (location: (49,0)-(49,1)) │ │ ├── flags: static_literal, decimal │ │ └── value: 1 │ ├── right: - │ │ @ CallNode (location: (47,4)-(47,7)) + │ │ @ CallNode (location: (49,4)-(49,7)) │ │ ├── flags: ∅ │ │ ├── receiver: - │ │ │ @ IntegerNode (location: (47,6)-(47,7)) + │ │ │ @ IntegerNode (location: (49,6)-(49,7)) │ │ │ ├── flags: static_literal, decimal │ │ │ └── value: 2 │ │ ├── call_operator_loc: ∅ │ │ ├── name: :+@ - │ │ ├── message_loc: (47,4)-(47,5) = "+" + │ │ ├── message_loc: (49,4)-(49,5) = "+" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ │ │ └── block: ∅ - │ └── operator_loc: (47,1)-(47,3) = ".." - └── @ RangeNode (location: (49,0)-(49,7)) + │ └── operator_loc: (49,1)-(49,3) = ".." + └── @ RangeNode (location: (51,0)-(51,7)) ├── flags: newline ├── left: - │ @ IntegerNode (location: (49,0)-(49,1)) + │ @ IntegerNode (location: (51,0)-(51,1)) │ ├── flags: static_literal, decimal │ └── value: 1 ├── right: - │ @ CallNode (location: (49,4)-(49,7)) + │ @ CallNode (location: (51,4)-(51,7)) │ ├── flags: ∅ │ ├── receiver: - │ │ @ IntegerNode (location: (49,6)-(49,7)) + │ │ @ IntegerNode (location: (51,6)-(51,7)) │ │ ├── flags: static_literal, decimal │ │ └── value: 2 │ ├── call_operator_loc: ∅ │ ├── name: :-@ - │ ├── message_loc: (49,4)-(49,5) = "-" + │ ├── message_loc: (51,4)-(51,5) = "-" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ │ └── block: ∅ - └── operator_loc: (49,1)-(49,3) = ".." + └── operator_loc: (51,1)-(51,3) = ".."