1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
@ ProgramNode (location: (1,0)-(3,27))
├── locals: [:x]
└── statements:
@ StatementsNode (location: (1,0)-(3,27))
└── body: (length: 3)
├── @ RescueModifierNode (location: (1,0)-(1,14))
│ ├── expression:
│ │ @ CallNode (location: (1,0)-(1,3))
│ │ ├── flags: variable_call, ignore_visibility
│ │ ├── receiver: ∅
│ │ ├── call_operator_loc: ∅
│ │ ├── name: :foo
│ │ ├── message_loc: (1,0)-(1,3) = "foo"
│ │ ├── opening_loc: ∅
│ │ ├── arguments: ∅
│ │ ├── closing_loc: ∅
│ │ └── block: ∅
│ ├── keyword_loc: (1,4)-(1,10) = "rescue"
│ └── rescue_expression:
│ @ CallNode (location: (1,11)-(1,14))
│ ├── flags: variable_call, ignore_visibility
│ ├── receiver: ∅
│ ├── call_operator_loc: ∅
│ ├── name: :bar
│ ├── message_loc: (1,11)-(1,14) = "bar"
│ ├── opening_loc: ∅
│ ├── arguments: ∅
│ ├── closing_loc: ∅
│ └── block: ∅
├── @ RescueModifierNode (location: (2,0)-(2,21))
│ ├── expression:
│ │ @ CallNode (location: (2,0)-(2,3))
│ │ ├── flags: variable_call, ignore_visibility
│ │ ├── receiver: ∅
│ │ ├── call_operator_loc: ∅
│ │ ├── name: :foo
│ │ ├── message_loc: (2,0)-(2,3) = "foo"
│ │ ├── opening_loc: ∅
│ │ ├── arguments: ∅
│ │ ├── closing_loc: ∅
│ │ └── block: ∅
│ ├── keyword_loc: (2,4)-(2,10) = "rescue"
│ └── rescue_expression:
│ @ ReturnNode (location: (2,11)-(2,21))
│ ├── flags: ∅
│ ├── keyword_loc: (2,11)-(2,17) = "return"
│ └── arguments:
│ @ ArgumentsNode (location: (2,18)-(2,21))
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ CallNode (location: (2,18)-(2,21))
│ ├── flags: variable_call, ignore_visibility
│ ├── receiver: ∅
│ ├── call_operator_loc: ∅
│ ├── name: :bar
│ ├── message_loc: (2,18)-(2,21) = "bar"
│ ├── opening_loc: ∅
│ ├── arguments: ∅
│ ├── closing_loc: ∅
│ └── block: ∅
└── @ LocalVariableWriteNode (location: (3,0)-(3,27))
├── name: :x
├── depth: 0
├── name_loc: (3,0)-(3,1) = "x"
├── value:
│ @ ParenthesesNode (location: (3,4)-(3,27))
│ ├── body:
│ │ @ StatementsNode (location: (3,5)-(3,26))
│ │ └── body: (length: 1)
│ │ └── @ RescueModifierNode (location: (3,5)-(3,26))
│ │ ├── expression:
│ │ │ @ CallNode (location: (3,5)-(3,8))
│ │ │ ├── flags: variable_call, ignore_visibility
│ │ │ ├── receiver: ∅
│ │ │ ├── call_operator_loc: ∅
│ │ │ ├── name: :foo
│ │ │ ├── message_loc: (3,5)-(3,8) = "foo"
│ │ │ ├── opening_loc: ∅
│ │ │ ├── arguments: ∅
│ │ │ ├── closing_loc: ∅
│ │ │ └── block: ∅
│ │ ├── keyword_loc: (3,9)-(3,15) = "rescue"
│ │ └── rescue_expression:
│ │ @ ReturnNode (location: (3,16)-(3,26))
│ │ ├── flags: ∅
│ │ ├── keyword_loc: (3,16)-(3,22) = "return"
│ │ └── arguments:
│ │ @ ArgumentsNode (location: (3,23)-(3,26))
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ CallNode (location: (3,23)-(3,26))
│ │ ├── flags: variable_call, ignore_visibility
│ │ ├── receiver: ∅
│ │ ├── call_operator_loc: ∅
│ │ ├── name: :bar
│ │ ├── message_loc: (3,23)-(3,26) = "bar"
│ │ ├── opening_loc: ∅
│ │ ├── arguments: ∅
│ │ ├── closing_loc: ∅
│ │ └── block: ∅
│ ├── opening_loc: (3,4)-(3,5) = "("
│ └── closing_loc: (3,26)-(3,27) = ")"
└── operator_loc: (3,2)-(3,3) = "="
|