blob: 80fa43fcfa32e7f8ef7b5b0cdc2cc61f51c09817 (
plain)
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
|
@ ProgramNode (location: (0...33))
├── locals: [:o]
└── statements:
@ StatementsNode (location: (0...33))
└── body: (length: 2)
├── @ DefNode (location: (0...19))
│ ├── name: :a
│ ├── name_loc: (4...5) = "a"
│ ├── receiver: ∅
│ ├── parameters:
│ │ @ ParametersNode (location: (6...8))
│ │ ├── requireds: (length: 0)
│ │ ├── optionals: (length: 0)
│ │ ├── posts: (length: 0)
│ │ ├── rest: ∅
│ │ ├── keywords: (length: 1)
│ │ │ └── @ KeywordParameterNode (location: (6...8))
│ │ │ ├── name: :b
│ │ │ ├── name_loc: (6...8) = "b:"
│ │ │ └── value: ∅
│ │ ├── keyword_rest: ∅
│ │ └── block: ∅
│ ├── body:
│ │ @ StatementsNode (location: (9...15))
│ │ └── body: (length: 1)
│ │ └── @ ReturnNode (location: (9...15))
│ │ ├── keyword_loc: (9...15) = "return"
│ │ └── arguments: ∅
│ ├── locals: [:b]
│ ├── def_keyword_loc: (0...3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
│ ├── rparen_loc: ∅
│ ├── equal_loc: ∅
│ └── end_keyword_loc: (16...19) = "end"
└── @ LocalVariableWriteNode (location: (21...33))
├── name: :o
├── depth: 0
├── name_loc: (21...22) = "o"
├── value:
│ @ HashNode (location: (25...33))
│ ├── opening_loc: (25...26) = "{"
│ ├── elements: (length: 1)
│ │ └── @ AssocNode (location: (27...31))
│ │ ├── key:
│ │ │ @ SymbolNode (location: (27...29))
│ │ │ ├── opening_loc: ∅
│ │ │ ├── value_loc: (27...28) = "a"
│ │ │ ├── closing_loc: (28...29) = ":"
│ │ │ └── unescaped: "a"
│ │ ├── value:
│ │ │ @ IntegerNode (location: (30...31))
│ │ │ └── flags: decimal
│ │ └── operator_loc: ∅
│ └── closing_loc: (32...33) = "}"
└── operator_loc: (23...24) = "="
|