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
|
@ ProgramNode (location: (1,6)-(5,9))
├── locals: []
└── statements:
@ StatementsNode (location: (1,6)-(5,9))
└── body: (length: 1)
└── @ DefNode (location: (1,6)-(5,9))
├── name: :blah
├── name_loc: (1,10)-(1,14) = "blah"
├── receiver: ∅
├── parameters: ∅
├── body:
│ @ StatementsNode (location: (2,8)-(4,11))
│ └── body: (length: 1)
│ └── @ IfNode (location: (2,8)-(4,11))
│ ├── if_keyword_loc: (2,8)-(2,10) = "if"
│ ├── predicate:
│ │ @ TrueNode (location: (2,11)-(2,15))
│ ├── then_keyword_loc: (2,16)-(2,20) = "then"
│ ├── statements:
│ │ @ StatementsNode (location: (3,10)-(3,19))
│ │ └── body: (length: 1)
│ │ └── @ ReturnNode (location: (3,10)-(3,19))
│ │ ├── flags: redundant
│ │ ├── keyword_loc: (3,10)-(3,16) = "return"
│ │ └── arguments:
│ │ @ ArgumentsNode (location: (3,17)-(3,19))
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ IntegerNode (location: (3,17)-(3,19))
│ │ ├── flags: decimal
│ │ └── value: 42
│ ├── consequent: ∅
│ └── end_keyword_loc: (4,8)-(4,11) = "end"
├── locals: []
├── def_keyword_loc: (1,6)-(1,9) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
├── rparen_loc: ∅
├── equal_loc: ∅
└── end_keyword_loc: (5,6)-(5,9) = "end"
|