summaryrefslogtreecommitdiff
path: root/test/prism/snapshots/unless.txt
blob: 6c4aaf66a5d7fc431d7c7030c1c2b7ab8bb69c8f (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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
@ ProgramNode (location: (1,0)-(14,22))
├── locals: []
└── statements:
    @ StatementsNode (location: (1,0)-(14,22))
    └── body: (length: 7)
        ├── @ UnlessNode (location: (1,0)-(1,19))
        │   ├── keyword_loc: (1,0)-(1,6) = "unless"
        │   ├── predicate:
        │   │   @ TrueNode (location: (1,7)-(1,11))
        │   ├── then_keyword_loc: ∅
        │   ├── statements:
        │   │   @ StatementsNode (location: (1,13)-(1,14))
        │   │   └── body: (length: 1)
        │   │       └── @ IntegerNode (location: (1,13)-(1,14))
        │   │           ├── flags: decimal
        │   │           └── value: 1
        │   ├── consequent: ∅
        │   └── end_keyword_loc: (1,16)-(1,19) = "end"
        ├── @ UnlessNode (location: (3,0)-(4,12))
        │   ├── keyword_loc: (3,0)-(3,6) = "unless"
        │   ├── predicate:
        │   │   @ TrueNode (location: (3,7)-(3,11))
        │   ├── then_keyword_loc: ∅
        │   ├── statements:
        │   │   @ StatementsNode (location: (4,0)-(4,1))
        │   │   └── body: (length: 1)
        │   │       └── @ IntegerNode (location: (4,0)-(4,1))
        │   │           ├── flags: decimal
        │   │           └── value: 1
        │   ├── consequent:
        │   │   @ ElseNode (location: (4,2)-(4,12))
        │   │   ├── else_keyword_loc: (4,2)-(4,6) = "else"
        │   │   ├── statements:
        │   │   │   @ StatementsNode (location: (4,7)-(4,8))
        │   │   │   └── body: (length: 1)
        │   │   │       └── @ IntegerNode (location: (4,7)-(4,8))
        │   │   │           ├── flags: decimal
        │   │   │           └── value: 2
        │   │   └── end_keyword_loc: (4,9)-(4,12) = "end"
        │   └── end_keyword_loc: (4,9)-(4,12) = "end"
        ├── @ UnlessNode (location: (6,0)-(6,13))
        │   ├── keyword_loc: (6,2)-(6,8) = "unless"
        │   ├── predicate:
        │   │   @ TrueNode (location: (6,9)-(6,13))
        │   ├── then_keyword_loc: ∅
        │   ├── statements:
        │   │   @ StatementsNode (location: (6,0)-(6,1))
        │   │   └── body: (length: 1)
        │   │       └── @ IntegerNode (location: (6,0)-(6,1))
        │   │           ├── flags: decimal
        │   │           └── value: 1
        │   ├── consequent: ∅
        │   └── end_keyword_loc: ∅
        ├── @ CallNode (location: (8,0)-(8,25))
        │   ├── flags: ignore_visibility
        │   ├── receiver: ∅
        │   ├── call_operator_loc: ∅
        │   ├── name: :tap
        │   ├── message_loc: (8,0)-(8,3) = "tap"
        │   ├── opening_loc: ∅
        │   ├── arguments: ∅
        │   ├── closing_loc: ∅
        │   └── block:
        │       @ BlockNode (location: (8,4)-(8,25))
        │       ├── locals: []
        │       ├── parameters: ∅
        │       ├── body:
        │       │   @ StatementsNode (location: (8,6)-(8,23))
        │       │   └── body: (length: 1)
        │       │       └── @ UnlessNode (location: (8,6)-(8,23))
        │       │           ├── keyword_loc: (8,12)-(8,18) = "unless"
        │       │           ├── predicate:
        │       │           │   @ TrueNode (location: (8,19)-(8,23))
        │       │           ├── then_keyword_loc: ∅
        │       │           ├── statements:
        │       │           │   @ StatementsNode (location: (8,6)-(8,11))
        │       │           │   └── body: (length: 1)
        │       │           │       └── @ BreakNode (location: (8,6)-(8,11))
        │       │           │           ├── arguments: ∅
        │       │           │           └── keyword_loc: (8,6)-(8,11) = "break"
        │       │           ├── consequent: ∅
        │       │           └── end_keyword_loc: ∅
        │       ├── opening_loc: (8,4)-(8,5) = "{"
        │       └── closing_loc: (8,24)-(8,25) = "}"
        ├── @ CallNode (location: (10,0)-(10,24))
        │   ├── flags: ignore_visibility
        │   ├── receiver: ∅
        │   ├── call_operator_loc: ∅
        │   ├── name: :tap
        │   ├── message_loc: (10,0)-(10,3) = "tap"
        │   ├── opening_loc: ∅
        │   ├── arguments: ∅
        │   ├── closing_loc: ∅
        │   └── block:
        │       @ BlockNode (location: (10,4)-(10,24))
        │       ├── locals: []
        │       ├── parameters: ∅
        │       ├── body:
        │       │   @ StatementsNode (location: (10,6)-(10,22))
        │       │   └── body: (length: 1)
        │       │       └── @ UnlessNode (location: (10,6)-(10,22))
        │       │           ├── keyword_loc: (10,11)-(10,17) = "unless"
        │       │           ├── predicate:
        │       │           │   @ TrueNode (location: (10,18)-(10,22))
        │       │           ├── then_keyword_loc: ∅
        │       │           ├── statements:
        │       │           │   @ StatementsNode (location: (10,6)-(10,10))
        │       │           │   └── body: (length: 1)
        │       │           │       └── @ NextNode (location: (10,6)-(10,10))
        │       │           │           ├── arguments: ∅
        │       │           │           └── keyword_loc: (10,6)-(10,10) = "next"
        │       │           ├── consequent: ∅
        │       │           └── end_keyword_loc: ∅
        │       ├── opening_loc: (10,4)-(10,5) = "{"
        │       └── closing_loc: (10,23)-(10,24) = "}"
        ├── @ UnlessNode (location: (12,0)-(12,18))
        │   ├── keyword_loc: (12,7)-(12,13) = "unless"
        │   ├── predicate:
        │   │   @ TrueNode (location: (12,14)-(12,18))
        │   ├── then_keyword_loc: ∅
        │   ├── statements:
        │   │   @ StatementsNode (location: (12,0)-(12,6))
        │   │   └── body: (length: 1)
        │   │       └── @ ReturnNode (location: (12,0)-(12,6))
        │   │           ├── flags: ∅
        │   │           ├── keyword_loc: (12,0)-(12,6) = "return"
        │   │           └── arguments: ∅
        │   ├── consequent: ∅
        │   └── end_keyword_loc: ∅
        └── @ UnlessNode (location: (14,0)-(14,22))
            ├── keyword_loc: (14,11)-(14,17) = "unless"
            ├── predicate:
            │   @ CallNode (location: (14,18)-(14,22))
            │   ├── flags: ignore_visibility
            │   ├── receiver: ∅
            │   ├── call_operator_loc: ∅
            │   ├── name: :bar?
            │   ├── message_loc: (14,18)-(14,22) = "bar?"
            │   ├── opening_loc: ∅
            │   ├── arguments: ∅
            │   ├── closing_loc: ∅
            │   └── block: ∅
            ├── then_keyword_loc: ∅
            ├── statements:
            │   @ StatementsNode (location: (14,0)-(14,10))
            │   └── body: (length: 1)
            │       └── @ CallNode (location: (14,0)-(14,10))
            │           ├── flags: ignore_visibility
            │           ├── receiver: ∅
            │           ├── call_operator_loc: ∅
            │           ├── name: :foo
            │           ├── message_loc: (14,0)-(14,3) = "foo"
            │           ├── opening_loc: ∅
            │           ├── arguments:
            │           │   @ ArgumentsNode (location: (14,4)-(14,10))
            │           │   ├── flags: ∅
            │           │   └── arguments: (length: 2)
            │           │       ├── @ SymbolNode (location: (14,4)-(14,6))
            │           │       │   ├── flags: forced_us_ascii_encoding
            │           │       │   ├── opening_loc: (14,4)-(14,5) = ":"
            │           │       │   ├── value_loc: (14,5)-(14,6) = "a"
            │           │       │   ├── closing_loc: ∅
            │           │       │   └── unescaped: "a"
            │           │       └── @ SymbolNode (location: (14,8)-(14,10))
            │           │           ├── flags: forced_us_ascii_encoding
            │           │           ├── opening_loc: (14,8)-(14,9) = ":"
            │           │           ├── value_loc: (14,9)-(14,10) = "b"
            │           │           ├── closing_loc: ∅
            │           │           └── unescaped: "b"
            │           ├── closing_loc: ∅
            │           └── block: ∅
            ├── consequent: ∅
            └── end_keyword_loc: ∅