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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
|
@ ProgramNode (location: (1,0)-(18,3))
├── locals: []
└── statements:
@ StatementsNode (location: (1,0)-(18,3))
└── body: (length: 7)
├── @ ModuleNode (location: (1,0)-(1,18))
│ ├── locals: [:a]
│ ├── module_keyword_loc: (1,0)-(1,6) = "module"
│ ├── constant_path:
│ │ @ ConstantReadNode (location: (1,7)-(1,8))
│ │ └── name: :A
│ ├── body:
│ │ @ StatementsNode (location: (1,9)-(1,14))
│ │ └── body: (length: 1)
│ │ └── @ LocalVariableWriteNode (location: (1,9)-(1,14))
│ │ ├── name: :a
│ │ ├── depth: 0
│ │ ├── name_loc: (1,9)-(1,10) = "a"
│ │ ├── value:
│ │ │ @ IntegerNode (location: (1,13)-(1,14))
│ │ │ └── flags: decimal
│ │ └── operator_loc: (1,11)-(1,12) = "="
│ ├── end_keyword_loc: (1,15)-(1,18) = "end"
│ └── name: :A
├── @ InterpolatedStringNode (location: (3,0)-(3,18))
│ ├── opening_loc: (3,0)-(3,3) = "%Q{"
│ ├── parts: (length: 3)
│ │ ├── @ StringNode (location: (3,3)-(3,7))
│ │ │ ├── flags: ∅
│ │ │ ├── opening_loc: ∅
│ │ │ ├── content_loc: (3,3)-(3,7) = "aaa "
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "aaa "
│ │ ├── @ EmbeddedStatementsNode (location: (3,7)-(3,13))
│ │ │ ├── opening_loc: (3,7)-(3,9) = "\#{"
│ │ │ ├── statements:
│ │ │ │ @ StatementsNode (location: (3,9)-(3,12))
│ │ │ │ └── body: (length: 1)
│ │ │ │ └── @ CallNode (location: (3,9)-(3,12))
│ │ │ │ ├── receiver: ∅
│ │ │ │ ├── call_operator_loc: ∅
│ │ │ │ ├── message_loc: (3,9)-(3,12) = "bbb"
│ │ │ │ ├── opening_loc: ∅
│ │ │ │ ├── arguments: ∅
│ │ │ │ ├── closing_loc: ∅
│ │ │ │ ├── block: ∅
│ │ │ │ ├── flags: variable_call
│ │ │ │ └── name: "bbb"
│ │ │ └── closing_loc: (3,12)-(3,13) = "}"
│ │ └── @ StringNode (location: (3,13)-(3,17))
│ │ ├── flags: ∅
│ │ ├── opening_loc: ∅
│ │ ├── content_loc: (3,13)-(3,17) = " ccc"
│ │ ├── closing_loc: ∅
│ │ └── unescaped: " ccc"
│ └── closing_loc: (3,17)-(3,18) = "}"
├── @ ModuleNode (location: (5,0)-(6,3))
│ ├── locals: []
│ ├── module_keyword_loc: (5,0)-(5,6) = "module"
│ ├── constant_path:
│ │ @ ConstantPathNode (location: (5,7)-(5,11))
│ │ ├── parent:
│ │ │ @ CallNode (location: (5,7)-(5,8))
│ │ │ ├── receiver: ∅
│ │ │ ├── call_operator_loc: ∅
│ │ │ ├── message_loc: (5,7)-(5,8) = "m"
│ │ │ ├── opening_loc: ∅
│ │ │ ├── arguments: ∅
│ │ │ ├── closing_loc: ∅
│ │ │ ├── block: ∅
│ │ │ ├── flags: variable_call
│ │ │ └── name: "m"
│ │ ├── child:
│ │ │ @ ConstantReadNode (location: (5,10)-(5,11))
│ │ │ └── name: :M
│ │ └── delimiter_loc: (5,8)-(5,10) = "::"
│ ├── body: ∅
│ ├── end_keyword_loc: (6,0)-(6,3) = "end"
│ └── name: :M
├── @ ModuleNode (location: (8,0)-(9,19))
│ ├── locals: [:x]
│ ├── module_keyword_loc: (8,0)-(8,6) = "module"
│ ├── constant_path:
│ │ @ ConstantReadNode (location: (8,7)-(8,8))
│ │ └── name: :A
│ ├── body:
│ │ @ BeginNode (location: (9,1)-(9,19))
│ │ ├── begin_keyword_loc: ∅
│ │ ├── statements:
│ │ │ @ StatementsNode (location: (9,1)-(9,6))
│ │ │ └── body: (length: 1)
│ │ │ └── @ LocalVariableWriteNode (location: (9,1)-(9,6))
│ │ │ ├── name: :x
│ │ │ ├── depth: 0
│ │ │ ├── name_loc: (9,1)-(9,2) = "x"
│ │ │ ├── value:
│ │ │ │ @ IntegerNode (location: (9,5)-(9,6))
│ │ │ │ └── flags: decimal
│ │ │ └── operator_loc: (9,3)-(9,4) = "="
│ │ ├── rescue_clause:
│ │ │ @ RescueNode (location: (9,8)-(9,14))
│ │ │ ├── keyword_loc: (9,8)-(9,14) = "rescue"
│ │ │ ├── exceptions: (length: 0)
│ │ │ ├── operator_loc: ∅
│ │ │ ├── reference: ∅
│ │ │ ├── statements: ∅
│ │ │ └── consequent: ∅
│ │ ├── else_clause: ∅
│ │ ├── ensure_clause: ∅
│ │ └── end_keyword_loc: (9,16)-(9,19) = "end"
│ ├── end_keyword_loc: (9,16)-(9,19) = "end"
│ └── name: :A
├── @ ModuleNode (location: (11,0)-(12,3))
│ ├── locals: []
│ ├── module_keyword_loc: (11,0)-(11,6) = "module"
│ ├── constant_path:
│ │ @ ConstantPathNode (location: (11,7)-(11,10))
│ │ ├── parent: ∅
│ │ ├── child:
│ │ │ @ ConstantReadNode (location: (11,9)-(11,10))
│ │ │ └── name: :A
│ │ └── delimiter_loc: (11,7)-(11,9) = "::"
│ ├── body: ∅
│ ├── end_keyword_loc: (12,0)-(12,3) = "end"
│ └── name: :A
├── @ ModuleNode (location: (14,0)-(15,3))
│ ├── locals: []
│ ├── module_keyword_loc: (14,0)-(14,6) = "module"
│ ├── constant_path:
│ │ @ ConstantPathNode (location: (14,7)-(14,13))
│ │ ├── parent:
│ │ │ @ CallNode (location: (14,7)-(14,10))
│ │ │ ├── receiver:
│ │ │ │ @ ConstantReadNode (location: (14,7)-(14,8))
│ │ │ │ └── name: :A
│ │ │ ├── call_operator_loc: ∅
│ │ │ ├── message_loc: (14,8)-(14,10) = "[]"
│ │ │ ├── opening_loc: (14,8)-(14,9) = "["
│ │ │ ├── arguments: ∅
│ │ │ ├── closing_loc: (14,9)-(14,10) = "]"
│ │ │ ├── block: ∅
│ │ │ ├── flags: ∅
│ │ │ └── name: "[]"
│ │ ├── child:
│ │ │ @ ConstantReadNode (location: (14,12)-(14,13))
│ │ │ └── name: :B
│ │ └── delimiter_loc: (14,10)-(14,12) = "::"
│ ├── body: ∅
│ ├── end_keyword_loc: (15,0)-(15,3) = "end"
│ └── name: :B
└── @ ModuleNode (location: (17,0)-(18,3))
├── locals: []
├── module_keyword_loc: (17,0)-(17,6) = "module"
├── constant_path:
│ @ ConstantPathNode (location: (17,7)-(17,14))
│ ├── parent:
│ │ @ CallNode (location: (17,7)-(17,11))
│ │ ├── receiver:
│ │ │ @ ConstantReadNode (location: (17,7)-(17,8))
│ │ │ └── name: :A
│ │ ├── call_operator_loc: ∅
│ │ ├── message_loc: (17,8)-(17,11) = "[1]"
│ │ ├── opening_loc: (17,8)-(17,9) = "["
│ │ ├── arguments:
│ │ │ @ ArgumentsNode (location: (17,9)-(17,10))
│ │ │ └── arguments: (length: 1)
│ │ │ └── @ IntegerNode (location: (17,9)-(17,10))
│ │ │ └── flags: decimal
│ │ ├── closing_loc: (17,10)-(17,11) = "]"
│ │ ├── block: ∅
│ │ ├── flags: ∅
│ │ └── name: "[]"
│ ├── child:
│ │ @ ConstantReadNode (location: (17,13)-(17,14))
│ │ └── name: :B
│ └── delimiter_loc: (17,11)-(17,13) = "::"
├── body: ∅
├── end_keyword_loc: (18,0)-(18,3) = "end"
└── name: :B
|