diff options
Diffstat (limited to 'test/yarp/snapshots/while.txt')
-rw-r--r-- | test/yarp/snapshots/while.txt | 244 |
1 files changed, 122 insertions, 122 deletions
diff --git a/test/yarp/snapshots/while.txt b/test/yarp/snapshots/while.txt index 6dd96cd403..0ad9740324 100644 --- a/test/yarp/snapshots/while.txt +++ b/test/yarp/snapshots/while.txt @@ -1,74 +1,74 @@ -@ ProgramNode (location: (0...314)) +@ ProgramNode (location: (1,0)-(19,52)) ├── locals: [] └── statements: - @ StatementsNode (location: (0...314)) + @ StatementsNode (location: (1,0)-(19,52)) └── body: (length: 10) - ├── @ WhileNode (location: (0...18)) - │ ├── keyword_loc: (0...5) = "while" - │ ├── closing_loc: (15...18) = "end" + ├── @ WhileNode (location: (1,0)-(1,18)) + │ ├── keyword_loc: (1,0)-(1,5) = "while" + │ ├── closing_loc: (1,15)-(1,18) = "end" │ ├── predicate: - │ │ @ TrueNode (location: (6...10)) + │ │ @ TrueNode (location: (1,6)-(1,10)) │ ├── statements: - │ │ @ StatementsNode (location: (12...13)) + │ │ @ StatementsNode (location: (1,12)-(1,13)) │ │ └── body: (length: 1) - │ │ └── @ IntegerNode (location: (12...13)) + │ │ └── @ IntegerNode (location: (1,12)-(1,13)) │ │ └── flags: decimal │ └── flags: ∅ - ├── @ WhileNode (location: (20...32)) - │ ├── keyword_loc: (22...27) = "while" + ├── @ WhileNode (location: (3,0)-(3,12)) + │ ├── keyword_loc: (3,2)-(3,7) = "while" │ ├── closing_loc: ∅ │ ├── predicate: - │ │ @ TrueNode (location: (28...32)) + │ │ @ TrueNode (location: (3,8)-(3,12)) │ ├── statements: - │ │ @ StatementsNode (location: (20...21)) + │ │ @ StatementsNode (location: (3,0)-(3,1)) │ │ └── body: (length: 1) - │ │ └── @ IntegerNode (location: (20...21)) + │ │ └── @ IntegerNode (location: (3,0)-(3,1)) │ │ └── flags: decimal │ └── flags: ∅ - ├── @ WhileNode (location: (34...50)) - │ ├── keyword_loc: (40...45) = "while" + ├── @ WhileNode (location: (5,0)-(5,16)) + │ ├── keyword_loc: (5,6)-(5,11) = "while" │ ├── closing_loc: ∅ │ ├── predicate: - │ │ @ TrueNode (location: (46...50)) + │ │ @ TrueNode (location: (5,12)-(5,16)) │ ├── statements: - │ │ @ StatementsNode (location: (34...39)) + │ │ @ StatementsNode (location: (5,0)-(5,5)) │ │ └── body: (length: 1) - │ │ └── @ BreakNode (location: (34...39)) + │ │ └── @ BreakNode (location: (5,0)-(5,5)) │ │ ├── arguments: ∅ - │ │ └── keyword_loc: (34...39) = "break" + │ │ └── keyword_loc: (5,0)-(5,5) = "break" │ └── flags: ∅ - ├── @ WhileNode (location: (52...67)) - │ ├── keyword_loc: (57...62) = "while" + ├── @ WhileNode (location: (7,0)-(7,15)) + │ ├── keyword_loc: (7,5)-(7,10) = "while" │ ├── closing_loc: ∅ │ ├── predicate: - │ │ @ TrueNode (location: (63...67)) + │ │ @ TrueNode (location: (7,11)-(7,15)) │ ├── statements: - │ │ @ StatementsNode (location: (52...56)) + │ │ @ StatementsNode (location: (7,0)-(7,4)) │ │ └── body: (length: 1) - │ │ └── @ NextNode (location: (52...56)) + │ │ └── @ NextNode (location: (7,0)-(7,4)) │ │ ├── arguments: ∅ - │ │ └── keyword_loc: (52...56) = "next" + │ │ └── keyword_loc: (7,0)-(7,4) = "next" │ └── flags: ∅ - ├── @ WhileNode (location: (69...86)) - │ ├── keyword_loc: (76...81) = "while" + ├── @ WhileNode (location: (9,0)-(9,17)) + │ ├── keyword_loc: (9,7)-(9,12) = "while" │ ├── closing_loc: ∅ │ ├── predicate: - │ │ @ TrueNode (location: (82...86)) + │ │ @ TrueNode (location: (9,13)-(9,17)) │ ├── statements: - │ │ @ StatementsNode (location: (69...75)) + │ │ @ StatementsNode (location: (9,0)-(9,6)) │ │ └── body: (length: 1) - │ │ └── @ ReturnNode (location: (69...75)) - │ │ ├── keyword_loc: (69...75) = "return" + │ │ └── @ ReturnNode (location: (9,0)-(9,6)) + │ │ ├── keyword_loc: (9,0)-(9,6) = "return" │ │ └── arguments: ∅ │ └── flags: ∅ - ├── @ WhileNode (location: (88...109)) - │ ├── keyword_loc: (99...104) = "while" + ├── @ WhileNode (location: (11,0)-(11,21)) + │ ├── keyword_loc: (11,11)-(11,16) = "while" │ ├── closing_loc: ∅ │ ├── predicate: - │ │ @ CallNode (location: (105...109)) + │ │ @ CallNode (location: (11,17)-(11,21)) │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ - │ │ ├── message_loc: (105...109) = "bar?" + │ │ ├── message_loc: (11,17)-(11,21) = "bar?" │ │ ├── opening_loc: ∅ │ │ ├── arguments: ∅ │ │ ├── closing_loc: ∅ @@ -76,24 +76,24 @@ │ │ ├── flags: ∅ │ │ └── name: "bar?" │ ├── statements: - │ │ @ StatementsNode (location: (88...98)) + │ │ @ StatementsNode (location: (11,0)-(11,10)) │ │ └── body: (length: 1) - │ │ └── @ CallNode (location: (88...98)) + │ │ └── @ CallNode (location: (11,0)-(11,10)) │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ - │ │ ├── message_loc: (88...91) = "foo" + │ │ ├── message_loc: (11,0)-(11,3) = "foo" │ │ ├── opening_loc: ∅ │ │ ├── arguments: - │ │ │ @ ArgumentsNode (location: (92...98)) + │ │ │ @ ArgumentsNode (location: (11,4)-(11,10)) │ │ │ └── arguments: (length: 2) - │ │ │ ├── @ SymbolNode (location: (92...94)) - │ │ │ │ ├── opening_loc: (92...93) = ":" - │ │ │ │ ├── value_loc: (93...94) = "a" + │ │ │ ├── @ SymbolNode (location: (11,4)-(11,6)) + │ │ │ │ ├── opening_loc: (11,4)-(11,5) = ":" + │ │ │ │ ├── value_loc: (11,5)-(11,6) = "a" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "a" - │ │ │ └── @ SymbolNode (location: (96...98)) - │ │ │ ├── opening_loc: (96...97) = ":" - │ │ │ ├── value_loc: (97...98) = "b" + │ │ │ └── @ SymbolNode (location: (11,8)-(11,10)) + │ │ │ ├── opening_loc: (11,8)-(11,9) = ":" + │ │ │ ├── value_loc: (11,9)-(11,10) = "b" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "b" │ │ ├── closing_loc: ∅ @@ -101,38 +101,38 @@ │ │ ├── flags: ∅ │ │ └── name: "foo" │ └── flags: ∅ - ├── @ WhileNode (location: (111...161)) - │ ├── keyword_loc: (111...116) = "while" - │ ├── closing_loc: (158...161) = "end" + ├── @ WhileNode (location: (13,0)-(13,50)) + │ ├── keyword_loc: (13,0)-(13,5) = "while" + │ ├── closing_loc: (13,47)-(13,50) = "end" │ ├── predicate: - │ │ @ DefNode (location: (117...149)) + │ │ @ DefNode (location: (13,6)-(13,38)) │ │ ├── name: :foo - │ │ ├── name_loc: (126...129) = "foo" + │ │ ├── name_loc: (13,15)-(13,18) = "foo" │ │ ├── receiver: - │ │ │ @ SelfNode (location: (121...125)) + │ │ │ @ SelfNode (location: (13,10)-(13,14)) │ │ ├── parameters: - │ │ │ @ ParametersNode (location: (130...144)) + │ │ │ @ ParametersNode (location: (13,19)-(13,33)) │ │ │ ├── requireds: (length: 0) │ │ │ ├── optionals: (length: 1) - │ │ │ │ └── @ OptionalParameterNode (location: (130...144)) + │ │ │ │ └── @ OptionalParameterNode (location: (13,19)-(13,33)) │ │ │ │ ├── name: :a - │ │ │ │ ├── name_loc: (130...131) = "a" - │ │ │ │ ├── operator_loc: (132...133) = "=" + │ │ │ │ ├── name_loc: (13,19)-(13,20) = "a" + │ │ │ │ ├── operator_loc: (13,21)-(13,22) = "=" │ │ │ │ └── value: - │ │ │ │ @ CallNode (location: (134...144)) + │ │ │ │ @ CallNode (location: (13,23)-(13,33)) │ │ │ │ ├── receiver: ∅ │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── message_loc: (134...137) = "tap" + │ │ │ │ ├── message_loc: (13,23)-(13,26) = "tap" │ │ │ │ ├── opening_loc: ∅ │ │ │ │ ├── arguments: ∅ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ ├── block: - │ │ │ │ │ @ BlockNode (location: (138...144)) + │ │ │ │ │ @ BlockNode (location: (13,27)-(13,33)) │ │ │ │ │ ├── locals: [] │ │ │ │ │ ├── parameters: ∅ │ │ │ │ │ ├── body: ∅ - │ │ │ │ │ ├── opening_loc: (138...140) = "do" - │ │ │ │ │ └── closing_loc: (141...144) = "end" + │ │ │ │ │ ├── opening_loc: (13,27)-(13,29) = "do" + │ │ │ │ │ └── closing_loc: (13,30)-(13,33) = "end" │ │ │ │ ├── flags: ∅ │ │ │ │ └── name: "tap" │ │ │ ├── rest: ∅ @@ -142,142 +142,142 @@ │ │ │ └── block: ∅ │ │ ├── body: ∅ │ │ ├── locals: [:a] - │ │ ├── def_keyword_loc: (117...120) = "def" - │ │ ├── operator_loc: (125...126) = "." + │ │ ├── def_keyword_loc: (13,6)-(13,9) = "def" + │ │ ├── operator_loc: (13,14)-(13,15) = "." │ │ ├── lparen_loc: ∅ │ │ ├── rparen_loc: ∅ │ │ ├── equal_loc: ∅ - │ │ └── end_keyword_loc: (146...149) = "end" + │ │ └── end_keyword_loc: (13,35)-(13,38) = "end" │ ├── statements: - │ │ @ StatementsNode (location: (151...156)) + │ │ @ StatementsNode (location: (13,40)-(13,45)) │ │ └── body: (length: 1) - │ │ └── @ BreakNode (location: (151...156)) + │ │ └── @ BreakNode (location: (13,40)-(13,45)) │ │ ├── arguments: ∅ - │ │ └── keyword_loc: (151...156) = "break" + │ │ └── keyword_loc: (13,40)-(13,45) = "break" │ └── flags: ∅ - ├── @ WhileNode (location: (163...210)) - │ ├── keyword_loc: (163...168) = "while" - │ ├── closing_loc: (207...210) = "end" + ├── @ WhileNode (location: (15,0)-(15,47)) + │ ├── keyword_loc: (15,0)-(15,5) = "while" + │ ├── closing_loc: (15,44)-(15,47) = "end" │ ├── predicate: - │ │ @ ClassNode (location: (169...198)) + │ │ @ ClassNode (location: (15,6)-(15,35)) │ │ ├── locals: [:a] - │ │ ├── class_keyword_loc: (169...174) = "class" + │ │ ├── class_keyword_loc: (15,6)-(15,11) = "class" │ │ ├── constant_path: - │ │ │ @ ConstantReadNode (location: (175...178)) + │ │ │ @ ConstantReadNode (location: (15,12)-(15,15)) │ │ │ └── name: :Foo │ │ ├── inheritance_operator_loc: ∅ │ │ ├── superclass: ∅ │ │ ├── body: - │ │ │ @ StatementsNode (location: (179...193)) + │ │ │ @ StatementsNode (location: (15,16)-(15,30)) │ │ │ └── body: (length: 1) - │ │ │ └── @ LocalVariableWriteNode (location: (179...193)) + │ │ │ └── @ LocalVariableWriteNode (location: (15,16)-(15,30)) │ │ │ ├── name: :a │ │ │ ├── depth: 0 - │ │ │ ├── name_loc: (179...180) = "a" + │ │ │ ├── name_loc: (15,16)-(15,17) = "a" │ │ │ ├── value: - │ │ │ │ @ CallNode (location: (183...193)) + │ │ │ │ @ CallNode (location: (15,20)-(15,30)) │ │ │ │ ├── receiver: ∅ │ │ │ │ ├── call_operator_loc: ∅ - │ │ │ │ ├── message_loc: (183...186) = "tap" + │ │ │ │ ├── message_loc: (15,20)-(15,23) = "tap" │ │ │ │ ├── opening_loc: ∅ │ │ │ │ ├── arguments: ∅ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ ├── block: - │ │ │ │ │ @ BlockNode (location: (187...193)) + │ │ │ │ │ @ BlockNode (location: (15,24)-(15,30)) │ │ │ │ │ ├── locals: [] │ │ │ │ │ ├── parameters: ∅ │ │ │ │ │ ├── body: ∅ - │ │ │ │ │ ├── opening_loc: (187...189) = "do" - │ │ │ │ │ └── closing_loc: (190...193) = "end" + │ │ │ │ │ ├── opening_loc: (15,24)-(15,26) = "do" + │ │ │ │ │ └── closing_loc: (15,27)-(15,30) = "end" │ │ │ │ ├── flags: ∅ │ │ │ │ └── name: "tap" - │ │ │ └── operator_loc: (181...182) = "=" - │ │ ├── end_keyword_loc: (195...198) = "end" + │ │ │ └── operator_loc: (15,18)-(15,19) = "=" + │ │ ├── end_keyword_loc: (15,32)-(15,35) = "end" │ │ └── name: :Foo │ ├── statements: - │ │ @ StatementsNode (location: (200...205)) + │ │ @ StatementsNode (location: (15,37)-(15,42)) │ │ └── body: (length: 1) - │ │ └── @ BreakNode (location: (200...205)) + │ │ └── @ BreakNode (location: (15,37)-(15,42)) │ │ ├── arguments: ∅ - │ │ └── keyword_loc: (200...205) = "break" + │ │ └── keyword_loc: (15,37)-(15,42) = "break" │ └── flags: ∅ - ├── @ WhileNode (location: (212...260)) - │ ├── keyword_loc: (212...217) = "while" - │ ├── closing_loc: (257...260) = "end" + ├── @ WhileNode (location: (17,0)-(17,48)) + │ ├── keyword_loc: (17,0)-(17,5) = "while" + │ ├── closing_loc: (17,45)-(17,48) = "end" │ ├── predicate: - │ │ @ SingletonClassNode (location: (218...248)) + │ │ @ SingletonClassNode (location: (17,6)-(17,36)) │ │ ├── locals: [] - │ │ ├── class_keyword_loc: (218...223) = "class" - │ │ ├── operator_loc: (224...226) = "<<" + │ │ ├── class_keyword_loc: (17,6)-(17,11) = "class" + │ │ ├── operator_loc: (17,12)-(17,14) = "<<" │ │ ├── expression: - │ │ │ @ SelfNode (location: (227...231)) + │ │ │ @ SelfNode (location: (17,15)-(17,19)) │ │ ├── body: - │ │ │ @ StatementsNode (location: (233...243)) + │ │ │ @ StatementsNode (location: (17,21)-(17,31)) │ │ │ └── body: (length: 1) - │ │ │ └── @ CallNode (location: (233...243)) + │ │ │ └── @ CallNode (location: (17,21)-(17,31)) │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── message_loc: (233...236) = "tap" + │ │ │ ├── message_loc: (17,21)-(17,24) = "tap" │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ │ │ │ ├── block: - │ │ │ │ @ BlockNode (location: (237...243)) + │ │ │ │ @ BlockNode (location: (17,25)-(17,31)) │ │ │ │ ├── locals: [] │ │ │ │ ├── parameters: ∅ │ │ │ │ ├── body: ∅ - │ │ │ │ ├── opening_loc: (237...239) = "do" - │ │ │ │ └── closing_loc: (240...243) = "end" + │ │ │ │ ├── opening_loc: (17,25)-(17,27) = "do" + │ │ │ │ └── closing_loc: (17,28)-(17,31) = "end" │ │ │ ├── flags: ∅ │ │ │ └── name: "tap" - │ │ └── end_keyword_loc: (245...248) = "end" + │ │ └── end_keyword_loc: (17,33)-(17,36) = "end" │ ├── statements: - │ │ @ StatementsNode (location: (250...255)) + │ │ @ StatementsNode (location: (17,38)-(17,43)) │ │ └── body: (length: 1) - │ │ └── @ BreakNode (location: (250...255)) + │ │ └── @ BreakNode (location: (17,38)-(17,43)) │ │ ├── arguments: ∅ - │ │ └── keyword_loc: (250...255) = "break" + │ │ └── keyword_loc: (17,38)-(17,43) = "break" │ └── flags: ∅ - └── @ WhileNode (location: (262...314)) - ├── keyword_loc: (262...267) = "while" - ├── closing_loc: (311...314) = "end" + └── @ WhileNode (location: (19,0)-(19,52)) + ├── keyword_loc: (19,0)-(19,5) = "while" + ├── closing_loc: (19,49)-(19,52) = "end" ├── predicate: - │ @ SingletonClassNode (location: (268...302)) + │ @ SingletonClassNode (location: (19,6)-(19,40)) │ ├── locals: [:a] - │ ├── class_keyword_loc: (268...273) = "class" - │ ├── operator_loc: (274...276) = "<<" + │ ├── class_keyword_loc: (19,6)-(19,11) = "class" + │ ├── operator_loc: (19,12)-(19,14) = "<<" │ ├── expression: - │ │ @ SelfNode (location: (277...281)) + │ │ @ SelfNode (location: (19,15)-(19,19)) │ ├── body: - │ │ @ StatementsNode (location: (283...297)) + │ │ @ StatementsNode (location: (19,21)-(19,35)) │ │ └── body: (length: 1) - │ │ └── @ LocalVariableWriteNode (location: (283...297)) + │ │ └── @ LocalVariableWriteNode (location: (19,21)-(19,35)) │ │ ├── name: :a │ │ ├── depth: 0 - │ │ ├── name_loc: (283...284) = "a" + │ │ ├── name_loc: (19,21)-(19,22) = "a" │ │ ├── value: - │ │ │ @ CallNode (location: (287...297)) + │ │ │ @ CallNode (location: (19,25)-(19,35)) │ │ │ ├── receiver: ∅ │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── message_loc: (287...290) = "tap" + │ │ │ ├── message_loc: (19,25)-(19,28) = "tap" │ │ │ ├── opening_loc: ∅ │ │ │ ├── arguments: ∅ │ │ │ ├── closing_loc: ∅ │ │ │ ├── block: - │ │ │ │ @ BlockNode (location: (291...297)) + │ │ │ │ @ BlockNode (location: (19,29)-(19,35)) │ │ │ │ ├── locals: [] │ │ │ │ ├── parameters: ∅ │ │ │ │ ├── body: ∅ - │ │ │ │ ├── opening_loc: (291...293) = "do" - │ │ │ │ └── closing_loc: (294...297) = "end" + │ │ │ │ ├── opening_loc: (19,29)-(19,31) = "do" + │ │ │ │ └── closing_loc: (19,32)-(19,35) = "end" │ │ │ ├── flags: ∅ │ │ │ └── name: "tap" - │ │ └── operator_loc: (285...286) = "=" - │ └── end_keyword_loc: (299...302) = "end" + │ │ └── operator_loc: (19,23)-(19,24) = "=" + │ └── end_keyword_loc: (19,37)-(19,40) = "end" ├── statements: - │ @ StatementsNode (location: (304...309)) + │ @ StatementsNode (location: (19,42)-(19,47)) │ └── body: (length: 1) - │ └── @ BreakNode (location: (304...309)) + │ └── @ BreakNode (location: (19,42)-(19,47)) │ ├── arguments: ∅ - │ └── keyword_loc: (304...309) = "break" + │ └── keyword_loc: (19,42)-(19,47) = "break" └── flags: ∅ |