summaryrefslogtreecommitdiff
path: root/test/prism/snapshots/unparser/corpus/literal/defined.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/prism/snapshots/unparser/corpus/literal/defined.txt')
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/defined.txt55
1 files changed, 55 insertions, 0 deletions
diff --git a/test/prism/snapshots/unparser/corpus/literal/defined.txt b/test/prism/snapshots/unparser/corpus/literal/defined.txt
new file mode 100644
index 0000000000..89145ddcda
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/defined.txt
@@ -0,0 +1,55 @@
+@ ProgramNode (location: (1,0)-(3,27))
+├── locals: [:a, :b]
+└── statements:
+ @ StatementsNode (location: (1,0)-(3,27))
+ └── body: (length: 3)
+ ├── @ DefinedNode (location: (1,0)-(1,14))
+ │ ├── lparen_loc: (1,8)-(1,9) = "("
+ │ ├── value:
+ │ │ @ InstanceVariableReadNode (location: (1,9)-(1,13))
+ │ │ └── name: :@foo
+ │ ├── rparen_loc: (1,13)-(1,14) = ")"
+ │ └── keyword_loc: (1,0)-(1,8) = "defined?"
+ ├── @ DefinedNode (location: (2,0)-(2,13))
+ │ ├── lparen_loc: (2,8)-(2,9) = "("
+ │ ├── value:
+ │ │ @ ConstantReadNode (location: (2,9)-(2,12))
+ │ │ └── name: :Foo
+ │ ├── rparen_loc: (2,12)-(2,13) = ")"
+ │ └── keyword_loc: (2,0)-(2,8) = "defined?"
+ └── @ DefinedNode (location: (3,0)-(3,27))
+ ├── lparen_loc: (3,8)-(3,9) = "("
+ ├── value:
+ │ @ ParenthesesNode (location: (3,9)-(3,26))
+ │ ├── body:
+ │ │ @ StatementsNode (location: (3,10)-(3,25))
+ │ │ └── body: (length: 1)
+ │ │ └── @ MultiWriteNode (location: (3,10)-(3,25))
+ │ │ ├── lefts: (length: 2)
+ │ │ │ ├── @ LocalVariableTargetNode (location: (3,11)-(3,12))
+ │ │ │ │ ├── name: :a
+ │ │ │ │ └── depth: 0
+ │ │ │ └── @ LocalVariableTargetNode (location: (3,14)-(3,15))
+ │ │ │ ├── name: :b
+ │ │ │ └── depth: 0
+ │ │ ├── rest: ∅
+ │ │ ├── rights: (length: 0)
+ │ │ ├── lparen_loc: (3,10)-(3,11) = "("
+ │ │ ├── rparen_loc: (3,15)-(3,16) = ")"
+ │ │ ├── operator_loc: (3,17)-(3,18) = "="
+ │ │ └── value:
+ │ │ @ ArrayNode (location: (3,19)-(3,25))
+ │ │ ├── flags: ∅
+ │ │ ├── elements: (length: 2)
+ │ │ │ ├── @ IntegerNode (location: (3,20)-(3,21))
+ │ │ │ │ ├── flags: decimal
+ │ │ │ │ └── value: 1
+ │ │ │ └── @ IntegerNode (location: (3,23)-(3,24))
+ │ │ │ ├── flags: decimal
+ │ │ │ └── value: 2
+ │ │ ├── opening_loc: (3,19)-(3,20) = "["
+ │ │ └── closing_loc: (3,24)-(3,25) = "]"
+ │ ├── opening_loc: (3,9)-(3,10) = "("
+ │ └── closing_loc: (3,25)-(3,26) = ")"
+ ├── rparen_loc: (3,26)-(3,27) = ")"
+ └── keyword_loc: (3,0)-(3,8) = "defined?"