aboutsummaryrefslogtreecommitdiffstats
path: root/test/prism/snapshots/while.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/prism/snapshots/while.txt')
-rw-r--r--test/prism/snapshots/while.txt121
1 files changed, 79 insertions, 42 deletions
diff --git a/test/prism/snapshots/while.txt b/test/prism/snapshots/while.txt
index 0ebae18e38..0fdcfe10c1 100644
--- a/test/prism/snapshots/while.txt
+++ b/test/prism/snapshots/while.txt
@@ -1,8 +1,8 @@
-@ ProgramNode (location: (1,0)-(19,52))
+@ ProgramNode (location: (1,0)-(21,31))
├── locals: []
└── statements:
- @ StatementsNode (location: (1,0)-(19,52))
- └── body: (length: 10)
+ @ StatementsNode (location: (1,0)-(21,31))
+ └── body: (length: 11)
├── @ WhileNode (location: (1,0)-(1,18))
│ ├── keyword_loc: (1,0)-(1,5) = "while"
│ ├── closing_loc: (1,15)-(1,18) = "end"
@@ -239,46 +239,83 @@
│ │ ├── arguments: ∅
│ │ └── keyword_loc: (17,38)-(17,43) = "break"
│ └── flags: ∅
- └── @ WhileNode (location: (19,0)-(19,52))
- ├── keyword_loc: (19,0)-(19,5) = "while"
- ├── closing_loc: (19,49)-(19,52) = "end"
+ ├── @ WhileNode (location: (19,0)-(19,52))
+ │ ├── keyword_loc: (19,0)-(19,5) = "while"
+ │ ├── closing_loc: (19,49)-(19,52) = "end"
+ │ ├── predicate:
+ │ │ @ SingletonClassNode (location: (19,6)-(19,40))
+ │ │ ├── locals: [:a]
+ │ │ ├── class_keyword_loc: (19,6)-(19,11) = "class"
+ │ │ ├── operator_loc: (19,12)-(19,14) = "<<"
+ │ │ ├── expression:
+ │ │ │ @ SelfNode (location: (19,15)-(19,19))
+ │ │ ├── body:
+ │ │ │ @ StatementsNode (location: (19,21)-(19,35))
+ │ │ │ └── body: (length: 1)
+ │ │ │ └── @ LocalVariableWriteNode (location: (19,21)-(19,35))
+ │ │ │ ├── name: :a
+ │ │ │ ├── depth: 0
+ │ │ │ ├── name_loc: (19,21)-(19,22) = "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ CallNode (location: (19,25)-(19,35))
+ │ │ │ │ ├── receiver: ∅
+ │ │ │ │ ├── call_operator_loc: ∅
+ │ │ │ │ ├── message_loc: (19,25)-(19,28) = "tap"
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── arguments: ∅
+ │ │ │ │ ├── closing_loc: ∅
+ │ │ │ │ ├── block:
+ │ │ │ │ │ @ BlockNode (location: (19,29)-(19,35))
+ │ │ │ │ │ ├── locals: []
+ │ │ │ │ │ ├── parameters: ∅
+ │ │ │ │ │ ├── body: ∅
+ │ │ │ │ │ ├── opening_loc: (19,29)-(19,31) = "do"
+ │ │ │ │ │ └── closing_loc: (19,32)-(19,35) = "end"
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :tap
+ │ │ │ └── operator_loc: (19,23)-(19,24) = "="
+ │ │ └── end_keyword_loc: (19,37)-(19,40) = "end"
+ │ ├── statements:
+ │ │ @ StatementsNode (location: (19,42)-(19,47))
+ │ │ └── body: (length: 1)
+ │ │ └── @ BreakNode (location: (19,42)-(19,47))
+ │ │ ├── arguments: ∅
+ │ │ └── keyword_loc: (19,42)-(19,47) = "break"
+ │ └── flags: ∅
+ └── @ WhileNode (location: (21,0)-(21,31))
+ ├── keyword_loc: (21,0)-(21,5) = "while"
+ ├── closing_loc: (21,28)-(21,31) = "end"
├── predicate:
- │ @ SingletonClassNode (location: (19,6)-(19,40))
- │ ├── locals: [:a]
- │ ├── class_keyword_loc: (19,6)-(19,11) = "class"
- │ ├── operator_loc: (19,12)-(19,14) = "<<"
- │ ├── expression:
- │ │ @ SelfNode (location: (19,15)-(19,19))
+ │ @ DefNode (location: (21,6)-(21,26))
+ │ ├── name: :foo
+ │ ├── name_loc: (21,10)-(21,13) = "foo"
+ │ ├── receiver: ∅
+ │ ├── parameters: ∅
│ ├── body:
- │ │ @ StatementsNode (location: (19,21)-(19,35))
+ │ │ @ StatementsNode (location: (21,16)-(21,26))
│ │ └── body: (length: 1)
- │ │ └── @ LocalVariableWriteNode (location: (19,21)-(19,35))
- │ │ ├── name: :a
- │ │ ├── depth: 0
- │ │ ├── name_loc: (19,21)-(19,22) = "a"
- │ │ ├── value:
- │ │ │ @ CallNode (location: (19,25)-(19,35))
- │ │ │ ├── receiver: ∅
- │ │ │ ├── call_operator_loc: ∅
- │ │ │ ├── message_loc: (19,25)-(19,28) = "tap"
- │ │ │ ├── opening_loc: ∅
- │ │ │ ├── arguments: ∅
- │ │ │ ├── closing_loc: ∅
- │ │ │ ├── block:
- │ │ │ │ @ BlockNode (location: (19,29)-(19,35))
- │ │ │ │ ├── locals: []
- │ │ │ │ ├── parameters: ∅
- │ │ │ │ ├── body: ∅
- │ │ │ │ ├── opening_loc: (19,29)-(19,31) = "do"
- │ │ │ │ └── closing_loc: (19,32)-(19,35) = "end"
- │ │ │ ├── flags: ∅
- │ │ │ └── name: :tap
- │ │ └── operator_loc: (19,23)-(19,24) = "="
- │ └── end_keyword_loc: (19,37)-(19,40) = "end"
- ├── statements:
- │ @ StatementsNode (location: (19,42)-(19,47))
- │ └── body: (length: 1)
- │ └── @ BreakNode (location: (19,42)-(19,47))
- │ ├── arguments: ∅
- │ └── keyword_loc: (19,42)-(19,47) = "break"
+ │ │ └── @ CallNode (location: (21,16)-(21,26))
+ │ │ ├── receiver: ∅
+ │ │ ├── call_operator_loc: ∅
+ │ │ ├── message_loc: (21,16)-(21,19) = "bar"
+ │ │ ├── opening_loc: ∅
+ │ │ ├── arguments: ∅
+ │ │ ├── closing_loc: ∅
+ │ │ ├── block:
+ │ │ │ @ BlockNode (location: (21,20)-(21,26))
+ │ │ │ ├── locals: []
+ │ │ │ ├── parameters: ∅
+ │ │ │ ├── body: ∅
+ │ │ │ ├── opening_loc: (21,20)-(21,22) = "do"
+ │ │ │ └── closing_loc: (21,23)-(21,26) = "end"
+ │ │ ├── flags: ∅
+ │ │ └── name: :bar
+ │ ├── locals: []
+ │ ├── def_keyword_loc: (21,6)-(21,9) = "def"
+ │ ├── operator_loc: ∅
+ │ ├── lparen_loc: ∅
+ │ ├── rparen_loc: ∅
+ │ ├── equal_loc: (21,14)-(21,15) = "="
+ │ └── end_keyword_loc: ∅
+ ├── statements: ∅
└── flags: ∅