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
|
@ ProgramNode (location: (1,0)-(9,25))
├── locals: []
└── statements:
@ StatementsNode (location: (1,0)-(9,25))
└── body: (length: 5)
├── @ ConstantPathOperatorWriteNode (location: (1,0)-(1,8))
│ ├── target:
│ │ @ ConstantPathNode (location: (1,0)-(1,3))
│ │ ├── parent: ∅
│ │ ├── name: :A
│ │ ├── delimiter_loc: (1,0)-(1,2) = "::"
│ │ └── name_loc: (1,2)-(1,3) = "A"
│ ├── binary_operator_loc: (1,4)-(1,6) = "+="
│ ├── value:
│ │ @ IntegerNode (location: (1,7)-(1,8))
│ │ ├── flags: decimal
│ │ └── value: 1
│ └── binary_operator: :+
├── @ ConstantOperatorWriteNode (location: (3,0)-(3,6))
│ ├── name: :A
│ ├── name_loc: (3,0)-(3,1) = "A"
│ ├── binary_operator_loc: (3,2)-(3,4) = "+="
│ ├── value:
│ │ @ IntegerNode (location: (3,5)-(3,6))
│ │ ├── flags: decimal
│ │ └── value: 1
│ └── binary_operator: :+
├── @ ConstantPathOperatorWriteNode (location: (5,0)-(5,9))
│ ├── target:
│ │ @ ConstantPathNode (location: (5,0)-(5,4))
│ │ ├── parent:
│ │ │ @ ConstantReadNode (location: (5,0)-(5,1))
│ │ │ └── name: :B
│ │ ├── name: :A
│ │ ├── delimiter_loc: (5,1)-(5,3) = "::"
│ │ └── name_loc: (5,3)-(5,4) = "A"
│ ├── binary_operator_loc: (5,5)-(5,7) = "+="
│ ├── value:
│ │ @ IntegerNode (location: (5,8)-(5,9))
│ │ ├── flags: decimal
│ │ └── value: 1
│ └── binary_operator: :+
├── @ DefNode (location: (7,0)-(7,21))
│ ├── name: :x
│ ├── name_loc: (7,4)-(7,5) = "x"
│ ├── receiver: ∅
│ ├── parameters: ∅
│ ├── body:
│ │ @ StatementsNode (location: (7,7)-(7,16))
│ │ └── body: (length: 1)
│ │ └── @ ConstantPathOrWriteNode (location: (7,7)-(7,16))
│ │ ├── target:
│ │ │ @ ConstantPathNode (location: (7,7)-(7,10))
│ │ │ ├── parent: ∅
│ │ │ ├── name: :A
│ │ │ ├── delimiter_loc: (7,7)-(7,9) = "::"
│ │ │ └── name_loc: (7,9)-(7,10) = "A"
│ │ ├── operator_loc: (7,11)-(7,14) = "||="
│ │ └── value:
│ │ @ IntegerNode (location: (7,15)-(7,16))
│ │ ├── flags: decimal
│ │ └── value: 1
│ ├── locals: []
│ ├── def_keyword_loc: (7,0)-(7,3) = "def"
│ ├── operator_loc: ∅
│ ├── lparen_loc: ∅
│ ├── rparen_loc: ∅
│ ├── equal_loc: ∅
│ └── end_keyword_loc: (7,18)-(7,21) = "end"
└── @ DefNode (location: (9,0)-(9,25))
├── name: :x
├── name_loc: (9,4)-(9,5) = "x"
├── receiver: ∅
├── parameters: ∅
├── body:
│ @ StatementsNode (location: (9,7)-(9,20))
│ └── body: (length: 1)
│ └── @ ConstantPathOrWriteNode (location: (9,7)-(9,20))
│ ├── target:
│ │ @ ConstantPathNode (location: (9,7)-(9,14))
│ │ ├── parent:
│ │ │ @ SelfNode (location: (9,7)-(9,11))
│ │ ├── name: :A
│ │ ├── delimiter_loc: (9,11)-(9,13) = "::"
│ │ └── name_loc: (9,13)-(9,14) = "A"
│ ├── operator_loc: (9,15)-(9,18) = "||="
│ └── value:
│ @ IntegerNode (location: (9,19)-(9,20))
│ ├── flags: decimal
│ └── value: 1
├── locals: []
├── def_keyword_loc: (9,0)-(9,3) = "def"
├── operator_loc: ∅
├── lparen_loc: ∅
├── rparen_loc: ∅
├── equal_loc: ∅
└── end_keyword_loc: (9,22)-(9,25) = "end"
|