diff options
Diffstat (limited to 'test/prism/snapshots/unparser/corpus/literal/defs.txt')
-rw-r--r-- | test/prism/snapshots/unparser/corpus/literal/defs.txt | 358 |
1 files changed, 358 insertions, 0 deletions
diff --git a/test/prism/snapshots/unparser/corpus/literal/defs.txt b/test/prism/snapshots/unparser/corpus/literal/defs.txt new file mode 100644 index 0000000000..7858877172 --- /dev/null +++ b/test/prism/snapshots/unparser/corpus/literal/defs.txt @@ -0,0 +1,358 @@ +@ ProgramNode (location: (1,0)-(40,3)) +├── locals: [] +└── statements: + @ StatementsNode (location: (1,0)-(40,3)) + └── body: (length: 10) + ├── @ DefNode (location: (1,0)-(2,3)) + │ ├── name: :foo + │ ├── name_loc: (1,9)-(1,12) = "foo" + │ ├── receiver: + │ │ @ SelfNode (location: (1,4)-(1,8)) + │ ├── parameters: ∅ + │ ├── body: ∅ + │ ├── locals: [] + │ ├── def_keyword_loc: (1,0)-(1,3) = "def" + │ ├── operator_loc: (1,8)-(1,9) = "." + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── equal_loc: ∅ + │ └── end_keyword_loc: (2,0)-(2,3) = "end" + ├── @ DefNode (location: (4,0)-(6,3)) + │ ├── name: :foo + │ ├── name_loc: (4,9)-(4,12) = "foo" + │ ├── receiver: + │ │ @ SelfNode (location: (4,4)-(4,8)) + │ ├── parameters: ∅ + │ ├── body: + │ │ @ StatementsNode (location: (5,2)-(5,5)) + │ │ └── body: (length: 1) + │ │ └── @ CallNode (location: (5,2)-(5,5)) + │ │ ├── flags: variable_call, ignore_visibility + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :bar + │ │ ├── message_loc: (5,2)-(5,5) = "bar" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── locals: [] + │ ├── def_keyword_loc: (4,0)-(4,3) = "def" + │ ├── operator_loc: (4,8)-(4,9) = "." + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── equal_loc: ∅ + │ └── end_keyword_loc: (6,0)-(6,3) = "end" + ├── @ DefNode (location: (8,0)-(11,3)) + │ ├── name: :foo + │ ├── name_loc: (8,9)-(8,12) = "foo" + │ ├── receiver: + │ │ @ SelfNode (location: (8,4)-(8,8)) + │ ├── parameters: ∅ + │ ├── body: + │ │ @ StatementsNode (location: (9,2)-(10,5)) + │ │ └── body: (length: 2) + │ │ ├── @ CallNode (location: (9,2)-(9,5)) + │ │ │ ├── flags: variable_call, ignore_visibility + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :bar + │ │ │ ├── message_loc: (9,2)-(9,5) = "bar" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ └── @ CallNode (location: (10,2)-(10,5)) + │ │ ├── flags: variable_call, ignore_visibility + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :baz + │ │ ├── message_loc: (10,2)-(10,5) = "baz" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── locals: [] + │ ├── def_keyword_loc: (8,0)-(8,3) = "def" + │ ├── operator_loc: (8,8)-(8,9) = "." + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── equal_loc: ∅ + │ └── end_keyword_loc: (11,0)-(11,3) = "end" + ├── @ DefNode (location: (13,0)-(15,3)) + │ ├── name: :bar + │ ├── name_loc: (13,8)-(13,11) = "bar" + │ ├── receiver: + │ │ @ ConstantReadNode (location: (13,4)-(13,7)) + │ │ └── name: :Foo + │ ├── parameters: ∅ + │ ├── body: + │ │ @ StatementsNode (location: (14,2)-(14,5)) + │ │ └── body: (length: 1) + │ │ └── @ CallNode (location: (14,2)-(14,5)) + │ │ ├── flags: variable_call, ignore_visibility + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :bar + │ │ ├── message_loc: (14,2)-(14,5) = "bar" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── locals: [] + │ ├── def_keyword_loc: (13,0)-(13,3) = "def" + │ ├── operator_loc: (13,7)-(13,8) = "." + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── equal_loc: ∅ + │ └── end_keyword_loc: (15,0)-(15,3) = "end" + ├── @ DefNode (location: (17,0)-(20,3)) + │ ├── name: :bar + │ ├── name_loc: (18,3)-(18,6) = "bar" + │ ├── receiver: + │ │ @ ParenthesesNode (location: (17,4)-(18,2)) + │ │ ├── body: + │ │ │ @ CallNode (location: (17,5)-(18,1)) + │ │ │ ├── flags: ignore_visibility + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :foo + │ │ │ ├── message_loc: (17,5)-(17,8) = "foo" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: + │ │ │ @ BlockNode (location: (17,9)-(18,1)) + │ │ │ ├── locals: [:bar] + │ │ │ ├── parameters: + │ │ │ │ @ BlockParametersNode (location: (17,11)-(17,16)) + │ │ │ │ ├── parameters: + │ │ │ │ │ @ ParametersNode (location: (17,12)-(17,15)) + │ │ │ │ │ ├── requireds: (length: 1) + │ │ │ │ │ │ └── @ RequiredParameterNode (location: (17,12)-(17,15)) + │ │ │ │ │ │ ├── flags: ∅ + │ │ │ │ │ │ └── name: :bar + │ │ │ │ │ ├── optionals: (length: 0) + │ │ │ │ │ ├── rest: ∅ + │ │ │ │ │ ├── posts: (length: 0) + │ │ │ │ │ ├── keywords: (length: 0) + │ │ │ │ │ ├── keyword_rest: ∅ + │ │ │ │ │ └── block: ∅ + │ │ │ │ ├── locals: (length: 0) + │ │ │ │ ├── opening_loc: (17,11)-(17,12) = "|" + │ │ │ │ └── closing_loc: (17,15)-(17,16) = "|" + │ │ │ ├── body: ∅ + │ │ │ ├── opening_loc: (17,9)-(17,10) = "{" + │ │ │ └── closing_loc: (18,0)-(18,1) = "}" + │ │ ├── opening_loc: (17,4)-(17,5) = "(" + │ │ └── closing_loc: (18,1)-(18,2) = ")" + │ ├── parameters: ∅ + │ ├── body: + │ │ @ StatementsNode (location: (19,2)-(19,5)) + │ │ └── body: (length: 1) + │ │ └── @ CallNode (location: (19,2)-(19,5)) + │ │ ├── flags: variable_call, ignore_visibility + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :bar + │ │ ├── message_loc: (19,2)-(19,5) = "bar" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── locals: [] + │ ├── def_keyword_loc: (17,0)-(17,3) = "def" + │ ├── operator_loc: (18,2)-(18,3) = "." + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── equal_loc: ∅ + │ └── end_keyword_loc: (20,0)-(20,3) = "end" + ├── @ DefNode (location: (22,0)-(24,3)) + │ ├── name: :bar + │ ├── name_loc: (22,13)-(22,16) = "bar" + │ ├── receiver: + │ │ @ ParenthesesNode (location: (22,4)-(22,12)) + │ │ ├── body: + │ │ │ @ CallNode (location: (22,5)-(22,11)) + │ │ │ ├── flags: ignore_visibility + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── name: :foo + │ │ │ ├── message_loc: (22,5)-(22,8) = "foo" + │ │ │ ├── opening_loc: (22,8)-(22,9) = "(" + │ │ │ ├── arguments: + │ │ │ │ @ ArgumentsNode (location: (22,9)-(22,10)) + │ │ │ │ ├── flags: ∅ + │ │ │ │ └── arguments: (length: 1) + │ │ │ │ └── @ IntegerNode (location: (22,9)-(22,10)) + │ │ │ │ ├── flags: decimal + │ │ │ │ └── value: 1 + │ │ │ ├── closing_loc: (22,10)-(22,11) = ")" + │ │ │ └── block: ∅ + │ │ ├── opening_loc: (22,4)-(22,5) = "(" + │ │ └── closing_loc: (22,11)-(22,12) = ")" + │ ├── parameters: ∅ + │ ├── body: + │ │ @ StatementsNode (location: (23,2)-(23,5)) + │ │ └── body: (length: 1) + │ │ └── @ CallNode (location: (23,2)-(23,5)) + │ │ ├── flags: variable_call, ignore_visibility + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :bar + │ │ ├── message_loc: (23,2)-(23,5) = "bar" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── locals: [] + │ ├── def_keyword_loc: (22,0)-(22,3) = "def" + │ ├── operator_loc: (22,12)-(22,13) = "." + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── equal_loc: ∅ + │ └── end_keyword_loc: (24,0)-(24,3) = "end" + ├── @ DefNode (location: (26,0)-(28,3)) + │ ├── name: :bar + │ ├── name_loc: (26,19)-(26,22) = "bar" + │ ├── receiver: + │ │ @ ParenthesesNode (location: (26,4)-(26,18)) + │ │ ├── body: + │ │ │ @ CallNode (location: (26,5)-(26,17)) + │ │ │ ├── flags: ∅ + │ │ │ ├── receiver: + │ │ │ │ @ ConstantPathNode (location: (26,5)-(26,13)) + │ │ │ │ ├── parent: + │ │ │ │ │ @ ConstantReadNode (location: (26,5)-(26,8)) + │ │ │ │ │ └── name: :Foo + │ │ │ │ ├── name: :Bar + │ │ │ │ ├── delimiter_loc: (26,8)-(26,10) = "::" + │ │ │ │ └── name_loc: (26,10)-(26,13) = "Bar" + │ │ │ ├── call_operator_loc: (26,13)-(26,14) = "." + │ │ │ ├── name: :baz + │ │ │ ├── message_loc: (26,14)-(26,17) = "baz" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ └── block: ∅ + │ │ ├── opening_loc: (26,4)-(26,5) = "(" + │ │ └── closing_loc: (26,17)-(26,18) = ")" + │ ├── parameters: ∅ + │ ├── body: + │ │ @ StatementsNode (location: (27,2)-(27,5)) + │ │ └── body: (length: 1) + │ │ └── @ CallNode (location: (27,2)-(27,5)) + │ │ ├── flags: variable_call, ignore_visibility + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :baz + │ │ ├── message_loc: (27,2)-(27,5) = "baz" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── locals: [] + │ ├── def_keyword_loc: (26,0)-(26,3) = "def" + │ ├── operator_loc: (26,18)-(26,19) = "." + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── equal_loc: ∅ + │ └── end_keyword_loc: (28,0)-(28,3) = "end" + ├── @ DefNode (location: (30,0)-(32,3)) + │ ├── name: :bar + │ ├── name_loc: (30,15)-(30,18) = "bar" + │ ├── receiver: + │ │ @ ParenthesesNode (location: (30,4)-(30,14)) + │ │ ├── body: + │ │ │ @ ConstantPathNode (location: (30,5)-(30,13)) + │ │ │ ├── parent: + │ │ │ │ @ ConstantReadNode (location: (30,5)-(30,8)) + │ │ │ │ └── name: :Foo + │ │ │ ├── name: :Bar + │ │ │ ├── delimiter_loc: (30,8)-(30,10) = "::" + │ │ │ └── name_loc: (30,10)-(30,13) = "Bar" + │ │ ├── opening_loc: (30,4)-(30,5) = "(" + │ │ └── closing_loc: (30,13)-(30,14) = ")" + │ ├── parameters: ∅ + │ ├── body: + │ │ @ StatementsNode (location: (31,2)-(31,5)) + │ │ └── body: (length: 1) + │ │ └── @ CallNode (location: (31,2)-(31,5)) + │ │ ├── flags: variable_call, ignore_visibility + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :baz + │ │ ├── message_loc: (31,2)-(31,5) = "baz" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── locals: [] + │ ├── def_keyword_loc: (30,0)-(30,3) = "def" + │ ├── operator_loc: (30,14)-(30,15) = "." + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── equal_loc: ∅ + │ └── end_keyword_loc: (32,0)-(32,3) = "end" + ├── @ DefNode (location: (34,0)-(36,3)) + │ ├── name: :bar + │ ├── name_loc: (34,8)-(34,11) = "bar" + │ ├── receiver: + │ │ @ ConstantReadNode (location: (34,4)-(34,7)) + │ │ └── name: :Foo + │ ├── parameters: ∅ + │ ├── body: + │ │ @ StatementsNode (location: (35,2)-(35,5)) + │ │ └── body: (length: 1) + │ │ └── @ CallNode (location: (35,2)-(35,5)) + │ │ ├── flags: variable_call, ignore_visibility + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── name: :baz + │ │ ├── message_loc: (35,2)-(35,5) = "baz" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ └── block: ∅ + │ ├── locals: [] + │ ├── def_keyword_loc: (34,0)-(34,3) = "def" + │ ├── operator_loc: (34,7)-(34,8) = "." + │ ├── lparen_loc: ∅ + │ ├── rparen_loc: ∅ + │ ├── equal_loc: ∅ + │ └── end_keyword_loc: (36,0)-(36,3) = "end" + └── @ DefNode (location: (38,0)-(40,3)) + ├── name: :bar + ├── name_loc: (38,8)-(38,11) = "bar" + ├── receiver: + │ @ CallNode (location: (38,4)-(38,7)) + │ ├── flags: variable_call, ignore_visibility + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :foo + │ ├── message_loc: (38,4)-(38,7) = "foo" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── parameters: ∅ + ├── body: + │ @ StatementsNode (location: (39,2)-(39,5)) + │ └── body: (length: 1) + │ └── @ CallNode (location: (39,2)-(39,5)) + │ ├── flags: variable_call, ignore_visibility + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── name: :baz + │ ├── message_loc: (39,2)-(39,5) = "baz" + │ ├── opening_loc: ∅ + │ ├── arguments: ∅ + │ ├── closing_loc: ∅ + │ └── block: ∅ + ├── locals: [] + ├── def_keyword_loc: (38,0)-(38,3) = "def" + ├── operator_loc: (38,7)-(38,8) = "." + ├── lparen_loc: ∅ + ├── rparen_loc: ∅ + ├── equal_loc: ∅ + └── end_keyword_loc: (40,0)-(40,3) = "end" |