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
|
@ 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"
|