summaryrefslogtreecommitdiff
path: root/test/prism/snapshots/unless.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/prism/snapshots/unless.txt')
-rw-r--r--test/prism/snapshots/unless.txt173
1 files changed, 173 insertions, 0 deletions
diff --git a/test/prism/snapshots/unless.txt b/test/prism/snapshots/unless.txt
new file mode 100644
index 0000000000..6c4aaf66a5
--- /dev/null
+++ b/test/prism/snapshots/unless.txt
@@ -0,0 +1,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: ∅