diff options
Diffstat (limited to 'test/yarp/snapshots/ternary_operator.txt')
-rw-r--r-- | test/yarp/snapshots/ternary_operator.txt | 174 |
1 files changed, 87 insertions, 87 deletions
diff --git a/test/yarp/snapshots/ternary_operator.txt b/test/yarp/snapshots/ternary_operator.txt index 2a55373511..13aa17e81a 100644 --- a/test/yarp/snapshots/ternary_operator.txt +++ b/test/yarp/snapshots/ternary_operator.txt @@ -1,15 +1,15 @@ -@ ProgramNode (location: (0...131)) +@ ProgramNode (location: (1,0)-(15,12)) ├── locals: [:_a] └── statements: - @ StatementsNode (location: (0...131)) + @ StatementsNode (location: (1,0)-(15,12)) └── body: (length: 8) - ├── @ IfNode (location: (0...9)) + ├── @ IfNode (location: (1,0)-(1,9)) │ ├── if_keyword_loc: ∅ │ ├── predicate: - │ │ @ CallNode (location: (0...1)) + │ │ @ CallNode (location: (1,0)-(1,1)) │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ - │ │ ├── message_loc: (0...1) = "a" + │ │ ├── message_loc: (1,0)-(1,1) = "a" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ @@ -17,12 +17,12 @@ │ │ ├── flags: variable_call │ │ └── name: "a" │ ├── statements: - │ │ @ StatementsNode (location: (4...5)) + │ │ @ StatementsNode (location: (1,4)-(1,5)) │ │ └── body: (length: 1) - │ │ └── @ CallNode (location: (4...5)) + │ │ └── @ CallNode (location: (1,4)-(1,5)) │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ - │ │ ├── message_loc: (4...5) = "b" + │ │ ├── message_loc: (1,4)-(1,5) = "b" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ @@ -30,15 +30,15 @@ │ │ ├── flags: variable_call │ │ └── name: "b" │ ├── consequent: - │ │ @ ElseNode (location: (6...9)) - │ │ ├── else_keyword_loc: (6...7) = ":" + │ │ @ ElseNode (location: (1,6)-(1,9)) + │ │ ├── else_keyword_loc: (1,6)-(1,7) = ":" │ │ ├── statements: - │ │ │ @ StatementsNode (location: (8...9)) + │ │ │ @ StatementsNode (location: (1,8)-(1,9)) │ │ │ └── body: (length: 1) - │ │ │ └── @ CallNode (location: (8...9)) + │ │ │ └── @ CallNode (location: (1,8)-(1,9)) │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── message_loc: (8...9) = "c" + │ │ │ ├── message_loc: (1,8)-(1,9) = "c" │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ @@ -47,13 +47,13 @@ │ │ │ └── name: "c" │ │ └── end_keyword_loc: ∅ │ └── end_keyword_loc: ∅ - ├── @ IfNode (location: (11...38)) + ├── @ IfNode (location: (3,0)-(3,27)) │ ├── if_keyword_loc: ∅ │ ├── predicate: - │ │ @ CallNode (location: (11...12)) + │ │ @ CallNode (location: (3,0)-(3,1)) │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ - │ │ ├── message_loc: (11...12) = "a" + │ │ ├── message_loc: (3,0)-(3,1) = "a" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ @@ -61,15 +61,15 @@ │ │ ├── flags: variable_call │ │ └── name: "a" │ ├── statements: - │ │ @ StatementsNode (location: (15...25)) + │ │ @ StatementsNode (location: (3,4)-(3,14)) │ │ └── body: (length: 1) - │ │ └── @ DefinedNode (location: (15...25)) + │ │ └── @ DefinedNode (location: (3,4)-(3,14)) │ │ ├── lparen_loc: ∅ │ │ ├── value: - │ │ │ @ CallNode (location: (24...25)) + │ │ │ @ CallNode (location: (3,13)-(3,14)) │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── message_loc: (24...25) = "b" + │ │ │ ├── message_loc: (3,13)-(3,14) = "b" │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ @@ -77,20 +77,20 @@ │ │ │ ├── flags: variable_call │ │ │ └── name: "b" │ │ ├── rparen_loc: ∅ - │ │ └── keyword_loc: (15...23) = "defined?" + │ │ └── keyword_loc: (3,4)-(3,12) = "defined?" │ ├── consequent: - │ │ @ ElseNode (location: (26...38)) - │ │ ├── else_keyword_loc: (26...27) = ":" + │ │ @ ElseNode (location: (3,15)-(3,27)) + │ │ ├── else_keyword_loc: (3,15)-(3,16) = ":" │ │ ├── statements: - │ │ │ @ StatementsNode (location: (28...38)) + │ │ │ @ StatementsNode (location: (3,17)-(3,27)) │ │ │ └── body: (length: 1) - │ │ │ └── @ DefinedNode (location: (28...38)) + │ │ │ └── @ DefinedNode (location: (3,17)-(3,27)) │ │ │ ├── lparen_loc: ∅ │ │ │ ├── value: - │ │ │ │ @ CallNode (location: (37...38)) + │ │ │ │ @ CallNode (location: (3,26)-(3,27)) │ │ │ │ ├── receiver: ∅ │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── message_loc: (37...38) = "c" + │ │ │ │ ├── message_loc: (3,26)-(3,27) = "c" │ │ │ │ ├── opening_loc: ∅ │ │ │ │ ├── arguments: ∅ │ │ │ │ ├── closing_loc: ∅ @@ -98,16 +98,16 @@ │ │ │ │ ├── flags: variable_call │ │ │ │ └── name: "c" │ │ │ ├── rparen_loc: ∅ - │ │ │ └── keyword_loc: (28...36) = "defined?" + │ │ │ └── keyword_loc: (3,17)-(3,25) = "defined?" │ │ └── end_keyword_loc: ∅ │ └── end_keyword_loc: ∅ - ├── @ IfNode (location: (40...55)) + ├── @ IfNode (location: (5,0)-(5,15)) │ ├── if_keyword_loc: ∅ │ ├── predicate: - │ │ @ CallNode (location: (40...46)) + │ │ @ CallNode (location: (5,0)-(5,6)) │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ - │ │ ├── message_loc: (40...46) = "empty?" + │ │ ├── message_loc: (5,0)-(5,6) = "empty?" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ @@ -115,25 +115,25 @@ │ │ ├── flags: ∅ │ │ └── name: "empty?" │ ├── statements: - │ │ @ StatementsNode (location: (47...51)) + │ │ @ StatementsNode (location: (5,7)-(5,11)) │ │ └── body: (length: 1) - │ │ └── @ TrueNode (location: (47...51)) + │ │ └── @ TrueNode (location: (5,7)-(5,11)) │ ├── consequent: - │ │ @ ElseNode (location: (51...55)) - │ │ ├── else_keyword_loc: (51...52) = ":" + │ │ @ ElseNode (location: (5,11)-(5,15)) + │ │ ├── else_keyword_loc: (5,11)-(5,12) = ":" │ │ ├── statements: - │ │ │ @ StatementsNode (location: (52...55)) + │ │ │ @ StatementsNode (location: (5,12)-(5,15)) │ │ │ └── body: (length: 1) - │ │ │ └── @ NilNode (location: (52...55)) + │ │ │ └── @ NilNode (location: (5,12)-(5,15)) │ │ └── end_keyword_loc: ∅ │ └── end_keyword_loc: ∅ - ├── @ IfNode (location: (57...73)) + ├── @ IfNode (location: (7,0)-(7,16)) │ ├── if_keyword_loc: ∅ │ ├── predicate: - │ │ @ CallNode (location: (57...63)) + │ │ @ CallNode (location: (7,0)-(7,6)) │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ - │ │ ├── message_loc: (57...63) = "empty?" + │ │ ├── message_loc: (7,0)-(7,6) = "empty?" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ @@ -141,25 +141,25 @@ │ │ ├── flags: ∅ │ │ └── name: "empty?" │ ├── statements: - │ │ @ StatementsNode (location: (64...69)) + │ │ @ StatementsNode (location: (7,7)-(7,12)) │ │ └── body: (length: 1) - │ │ └── @ FalseNode (location: (64...69)) + │ │ └── @ FalseNode (location: (7,7)-(7,12)) │ ├── consequent: - │ │ @ ElseNode (location: (69...73)) - │ │ ├── else_keyword_loc: (69...70) = ":" + │ │ @ ElseNode (location: (7,12)-(7,16)) + │ │ ├── else_keyword_loc: (7,12)-(7,13) = ":" │ │ ├── statements: - │ │ │ @ StatementsNode (location: (70...73)) + │ │ │ @ StatementsNode (location: (7,13)-(7,16)) │ │ │ └── body: (length: 1) - │ │ │ └── @ NilNode (location: (70...73)) + │ │ │ └── @ NilNode (location: (7,13)-(7,16)) │ │ └── end_keyword_loc: ∅ │ └── end_keyword_loc: ∅ - ├── @ IfNode (location: (75...89)) + ├── @ IfNode (location: (9,0)-(9,14)) │ ├── if_keyword_loc: ∅ │ ├── predicate: - │ │ @ CallNode (location: (75...81)) + │ │ @ CallNode (location: (9,0)-(9,6)) │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ - │ │ ├── message_loc: (75...81) = "empty?" + │ │ ├── message_loc: (9,0)-(9,6) = "empty?" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ @@ -167,25 +167,25 @@ │ │ ├── flags: ∅ │ │ └── name: "empty?" │ ├── statements: - │ │ @ StatementsNode (location: (82...85)) + │ │ @ StatementsNode (location: (9,7)-(9,10)) │ │ └── body: (length: 1) - │ │ └── @ NilNode (location: (82...85)) + │ │ └── @ NilNode (location: (9,7)-(9,10)) │ ├── consequent: - │ │ @ ElseNode (location: (85...89)) - │ │ ├── else_keyword_loc: (85...86) = ":" + │ │ @ ElseNode (location: (9,10)-(9,14)) + │ │ ├── else_keyword_loc: (9,10)-(9,11) = ":" │ │ ├── statements: - │ │ │ @ StatementsNode (location: (86...89)) + │ │ │ @ StatementsNode (location: (9,11)-(9,14)) │ │ │ └── body: (length: 1) - │ │ │ └── @ NilNode (location: (86...89)) + │ │ │ └── @ NilNode (location: (9,11)-(9,14)) │ │ └── end_keyword_loc: ∅ │ └── end_keyword_loc: ∅ - ├── @ IfNode (location: (91...101)) + ├── @ IfNode (location: (11,0)-(11,10)) │ ├── if_keyword_loc: ∅ │ ├── predicate: - │ │ @ CallNode (location: (91...93)) + │ │ @ CallNode (location: (11,0)-(11,2)) │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ - │ │ ├── message_loc: (91...93) = "a?" + │ │ ├── message_loc: (11,0)-(11,2) = "a?" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ @@ -193,25 +193,25 @@ │ │ ├── flags: ∅ │ │ └── name: "a?" │ ├── statements: - │ │ @ StatementsNode (location: (94...97)) + │ │ @ StatementsNode (location: (11,3)-(11,6)) │ │ └── body: (length: 1) - │ │ └── @ NilNode (location: (94...97)) + │ │ └── @ NilNode (location: (11,3)-(11,6)) │ ├── consequent: - │ │ @ ElseNode (location: (97...101)) - │ │ ├── else_keyword_loc: (97...98) = ":" + │ │ @ ElseNode (location: (11,6)-(11,10)) + │ │ ├── else_keyword_loc: (11,6)-(11,7) = ":" │ │ ├── statements: - │ │ │ @ StatementsNode (location: (98...101)) + │ │ │ @ StatementsNode (location: (11,7)-(11,10)) │ │ │ └── body: (length: 1) - │ │ │ └── @ NilNode (location: (98...101)) + │ │ │ └── @ NilNode (location: (11,7)-(11,10)) │ │ └── end_keyword_loc: ∅ │ └── end_keyword_loc: ∅ - ├── @ IfNode (location: (103...117)) + ├── @ IfNode (location: (13,0)-(13,14)) │ ├── if_keyword_loc: ∅ │ ├── predicate: - │ │ @ CallNode (location: (103...104)) + │ │ @ CallNode (location: (13,0)-(13,1)) │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ - │ │ ├── message_loc: (103...104) = "a" + │ │ ├── message_loc: (13,0)-(13,1) = "a" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ @@ -219,12 +219,12 @@ │ │ ├── flags: variable_call │ │ └── name: "a" │ ├── statements: - │ │ @ StatementsNode (location: (106...110)) + │ │ @ StatementsNode (location: (13,3)-(13,7)) │ │ └── body: (length: 1) - │ │ └── @ CallNode (location: (106...110)) + │ │ └── @ CallNode (location: (13,3)-(13,7)) │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ - │ │ ├── message_loc: (106...110) = "var1" + │ │ ├── message_loc: (13,3)-(13,7) = "var1" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ @@ -232,15 +232,15 @@ │ │ ├── flags: variable_call │ │ └── name: "var1" │ ├── consequent: - │ │ @ ElseNode (location: (111...117)) - │ │ ├── else_keyword_loc: (111...112) = ":" + │ │ @ ElseNode (location: (13,8)-(13,14)) + │ │ ├── else_keyword_loc: (13,8)-(13,9) = ":" │ │ ├── statements: - │ │ │ @ StatementsNode (location: (113...117)) + │ │ │ @ StatementsNode (location: (13,10)-(13,14)) │ │ │ └── body: (length: 1) - │ │ │ └── @ CallNode (location: (113...117)) + │ │ │ └── @ CallNode (location: (13,10)-(13,14)) │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── message_loc: (113...117) = "var2" + │ │ │ ├── message_loc: (13,10)-(13,14) = "var2" │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ @@ -249,13 +249,13 @@ │ │ │ └── name: "var2" │ │ └── end_keyword_loc: ∅ │ └── end_keyword_loc: ∅ - └── @ IfNode (location: (119...131)) + └── @ IfNode (location: (15,0)-(15,12)) ├── if_keyword_loc: ∅ ├── predicate: - │ @ CallNode (location: (119...123)) + │ @ CallNode (location: (15,0)-(15,4)) │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ - │ ├── message_loc: (119...123) = "nil?" + │ ├── message_loc: (15,0)-(15,4) = "nil?" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ @@ -263,23 +263,23 @@ │ ├── flags: ∅ │ └── name: "nil?" ├── statements: - │ @ StatementsNode (location: (124...129)) + │ @ StatementsNode (location: (15,5)-(15,10)) │ └── body: (length: 1) - │ └── @ LocalVariableWriteNode (location: (124...129)) + │ └── @ LocalVariableWriteNode (location: (15,5)-(15,10)) │ ├── name: :_a │ ├── depth: 0 - │ ├── name_loc: (124...126) = "_a" + │ ├── name_loc: (15,5)-(15,7) = "_a" │ ├── value: - │ │ @ IntegerNode (location: (128...129)) + │ │ @ IntegerNode (location: (15,9)-(15,10)) │ │ └── flags: decimal - │ └── operator_loc: (127...128) = "=" + │ └── operator_loc: (15,8)-(15,9) = "=" ├── consequent: - │ @ ElseNode (location: (129...131)) - │ ├── else_keyword_loc: (129...130) = ":" + │ @ ElseNode (location: (15,10)-(15,12)) + │ ├── else_keyword_loc: (15,10)-(15,11) = ":" │ ├── statements: - │ │ @ StatementsNode (location: (130...131)) + │ │ @ StatementsNode (location: (15,11)-(15,12)) │ │ └── body: (length: 1) - │ │ └── @ IntegerNode (location: (130...131)) + │ │ └── @ IntegerNode (location: (15,11)-(15,12)) │ │ └── flags: decimal │ └── end_keyword_loc: ∅ └── end_keyword_loc: ∅ |