summaryrefslogtreecommitdiff
path: root/test/prism/snapshots/unparser/corpus/semantic/def.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/prism/snapshots/unparser/corpus/semantic/def.txt')
-rw-r--r--test/prism/snapshots/unparser/corpus/semantic/def.txt90
1 files changed, 90 insertions, 0 deletions
diff --git a/test/prism/snapshots/unparser/corpus/semantic/def.txt b/test/prism/snapshots/unparser/corpus/semantic/def.txt
new file mode 100644
index 0000000000..b44983c2f3
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/semantic/def.txt
@@ -0,0 +1,90 @@
+@ ProgramNode (location: (1,0)-(7,3))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(7,3))
+ └── body: (length: 2)
+ ├── @ DefNode (location: (1,0)-(3,3))
+ │ ├── name: :foo
+ │ ├── name_loc: (1,4)-(1,7) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
+ │ ├── body:
+ │ │ @ StatementsNode (location: (2,2)-(2,9))
+ │ │ └── body: (length: 1)
+ │ │ └── @ ParenthesesNode (location: (2,2)-(2,9))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (2,3)-(2,8))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ CallNode (location: (2,3)-(2,8))
+ │ │ │ ├── flags: ∅
+ │ │ │ ├── receiver:
+ │ │ │ │ @ CallNode (location: (2,3)-(2,4))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :a
+ │ │ │ │ ├── message_loc: (2,3)-(2,4) = "a"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ ├── name: :-
+ │ │ │ ├── message_loc: (2,5)-(2,6) = "-"
+ │ │ │ ├── opening_loc: ∅
+ │ │ │ ├── arguments:
+ │ │ │ │ @ ArgumentsNode (location: (2,7)-(2,8))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── arguments: (length: 1)
+ │ │ │ │ └── @ CallNode (location: (2,7)-(2,8))
+ │ │ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── name: :b
+ │ │ │ │ ├── message_loc: (2,7)-(2,8) = "b"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ └── block: ∅
+ │ │ │ ├── closing_loc: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── opening_loc: (2,2)-(2,3) = "("
+ │ │ └── closing_loc: (2,8)-(2,9) = ")"
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (1,0)-(1,3) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: ∅
+ │ └── end_keyword_loc: (3,0)-(3,3) = "end"
+ └── @ DefNode (location: (5,0)-(7,3))
+ ├── name: :foo
+ ├── name_loc: (5,4)-(5,7) = "foo"
+ ├── receiver: ∅
+ ├── parameters: ∅
+ ├── body:
+ │ @ StatementsNode (location: (6,2)-(6,20))
+ │ └── body: (length: 1)
+ │ └── @ RescueModifierNode (location: (6,2)-(6,20))
+ │ ├── expression:
+ │ │ @ CallNode (location: (6,2)-(6,3))
+ │ │ ├── flags: variable_call, ignore_visibility
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── name: :a
+ │ │ ├── message_loc: (6,2)-(6,3) = "a"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ └── block: ∅
+ │ ├── keyword_loc: (6,4)-(6,10) = "rescue"
+ │ └── rescue_expression:
+ │ @ ConstantReadNode (location: (6,11)-(6,20))
+ │ └── name: :Exception
+ ├── locals: []
+ ├── def_keyword_loc: (5,0)-(5,3) = "def"
+ ├── operator_loc: ∅
+ ├── lparen_loc: ∅
+ ├── rparen_loc: ∅
+ ├── equal_loc: ∅
+ └── end_keyword_loc: (7,0)-(7,3) = "end"