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
|
@ ProgramNode (location: (1,0)-(3,3))
├── locals: []
└── statements:
@ StatementsNode (location: (1,0)-(3,3))
└── body: (length: 1)
└── @ ClassNode (location: (1,0)-(3,3))
├── locals: []
├── class_keyword_loc: (1,0)-(1,5) = "class"
├── constant_path:
│ @ ConstantReadNode (location: (1,6)-(1,7))
│ └── name: :X
├── inheritance_operator_loc: ∅
├── superclass: ∅
├── body:
│ @ StatementsNode (location: (2,2)-(2,21))
│ └── body: (length: 1)
│ └── @ DefNode (location: (2,2)-(2,21))
│ ├── name: :==
│ ├── name_loc: (2,11)-(2,13) = "=="
│ ├── receiver:
│ │ @ SelfNode (location: (2,6)-(2,10))
│ ├── parameters:
│ │ @ ParametersNode (location: (2,14)-(2,15))
│ │ ├── requireds: (length: 1)
│ │ │ └── @ RequiredParameterNode (location: (2,14)-(2,15))
│ │ │ └── name: :o
│ │ ├── optionals: (length: 0)
│ │ ├── rest: ∅
│ │ ├── posts: (length: 0)
│ │ ├── keywords: (length: 0)
│ │ ├── keyword_rest: ∅
│ │ └── block: ∅
│ ├── body:
│ │ @ StatementsNode (location: (2,19)-(2,21))
│ │ └── body: (length: 1)
│ │ └── @ IntegerNode (location: (2,19)-(2,21))
│ │ └── flags: decimal
│ ├── locals: [:o]
│ ├── locals_body_index: 1
│ ├── def_keyword_loc: (2,2)-(2,5) = "def"
│ ├── operator_loc: (2,10)-(2,11) = "."
│ ├── lparen_loc: (2,13)-(2,14) = "("
│ ├── rparen_loc: (2,15)-(2,16) = ")"
│ ├── equal_loc: (2,17)-(2,18) = "="
│ └── end_keyword_loc: ∅
├── end_keyword_loc: (3,0)-(3,3) = "end"
└── name: :X
|