summaryrefslogtreecommitdiff
path: root/test/prism/snapshots/unparser/corpus/literal/lambda.txt
diff options
context:
space:
mode:
Diffstat (limited to 'test/prism/snapshots/unparser/corpus/literal/lambda.txt')
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/lambda.txt151
1 files changed, 151 insertions, 0 deletions
diff --git a/test/prism/snapshots/unparser/corpus/literal/lambda.txt b/test/prism/snapshots/unparser/corpus/literal/lambda.txt
new file mode 100644
index 0000000000..3594787bca
--- /dev/null
+++ b/test/prism/snapshots/unparser/corpus/literal/lambda.txt
@@ -0,0 +1,151 @@
+@ ProgramNode (location: (1,0)-(13,1))
+├── locals: []
+└── statements:
+ @ StatementsNode (location: (1,0)-(13,1))
+ └── body: (length: 6)
+ ├── @ CallNode (location: (1,0)-(2,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :lambda
+ │ ├── message_loc: (1,0)-(1,6) = "lambda"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (1,7)-(2,1))
+ │ ├── locals: []
+ │ ├── parameters: ∅
+ │ ├── body: ∅
+ │ ├── opening_loc: (1,7)-(1,8) = "{"
+ │ └── closing_loc: (2,0)-(2,1) = "}"
+ ├── @ CallNode (location: (3,0)-(5,1))
+ │ ├── flags: ignore_visibility
+ │ ├── receiver: ∅
+ │ ├── call_operator_loc: ∅
+ │ ├── name: :lambda
+ │ ├── message_loc: (3,0)-(3,6) = "lambda"
+ │ ├── opening_loc: ∅
+ │ ├── arguments: ∅
+ │ ├── closing_loc: ∅
+ │ └── block:
+ │ @ BlockNode (location: (3,7)-(5,1))
+ │ ├── locals: [:a, :b]
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (3,9)-(3,15))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (3,10)-(3,14))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (3,10)-(3,11))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (3,13)-(3,14))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (3,9)-(3,10) = "|"
+ │ │ └── closing_loc: (3,14)-(3,15) = "|"
+ │ ├── body:
+ │ │ @ StatementsNode (location: (4,2)-(4,3))
+ │ │ └── body: (length: 1)
+ │ │ └── @ LocalVariableReadNode (location: (4,2)-(4,3))
+ │ │ ├── name: :a
+ │ │ └── depth: 0
+ │ ├── opening_loc: (3,7)-(3,8) = "{"
+ │ └── closing_loc: (5,0)-(5,1) = "}"
+ ├── @ LambdaNode (location: (6,0)-(7,1))
+ │ ├── locals: []
+ │ ├── operator_loc: (6,0)-(6,2) = "->"
+ │ ├── opening_loc: (6,5)-(6,6) = "{"
+ │ ├── closing_loc: (7,0)-(7,1) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (6,2)-(6,4))
+ │ │ ├── parameters: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (6,2)-(6,3) = "("
+ │ │ └── closing_loc: (6,3)-(6,4) = ")"
+ │ └── body: ∅
+ ├── @ LambdaNode (location: (8,0)-(9,1))
+ │ ├── locals: [:a]
+ │ ├── operator_loc: (8,0)-(8,2) = "->"
+ │ ├── opening_loc: (8,6)-(8,7) = "{"
+ │ ├── closing_loc: (9,0)-(9,1) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (8,2)-(8,5))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (8,3)-(8,4))
+ │ │ │ ├── requireds: (length: 1)
+ │ │ │ │ └── @ RequiredParameterNode (location: (8,3)-(8,4))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (8,2)-(8,3) = "("
+ │ │ └── closing_loc: (8,4)-(8,5) = ")"
+ │ └── body: ∅
+ ├── @ LambdaNode (location: (10,0)-(11,1))
+ │ ├── locals: [:a, :b]
+ │ ├── operator_loc: (10,0)-(10,2) = "->"
+ │ ├── opening_loc: (10,9)-(10,10) = "{"
+ │ ├── closing_loc: (11,0)-(11,1) = "}"
+ │ ├── parameters:
+ │ │ @ BlockParametersNode (location: (10,2)-(10,8))
+ │ │ ├── parameters:
+ │ │ │ @ ParametersNode (location: (10,3)-(10,7))
+ │ │ │ ├── requireds: (length: 2)
+ │ │ │ │ ├── @ RequiredParameterNode (location: (10,3)-(10,4))
+ │ │ │ │ │ ├── flags: ∅
+ │ │ │ │ │ └── name: :a
+ │ │ │ │ └── @ RequiredParameterNode (location: (10,6)-(10,7))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :b
+ │ │ │ ├── optionals: (length: 0)
+ │ │ │ ├── rest: ∅
+ │ │ │ ├── posts: (length: 0)
+ │ │ │ ├── keywords: (length: 0)
+ │ │ │ ├── keyword_rest: ∅
+ │ │ │ └── block: ∅
+ │ │ ├── locals: (length: 0)
+ │ │ ├── opening_loc: (10,2)-(10,3) = "("
+ │ │ └── closing_loc: (10,7)-(10,8) = ")"
+ │ └── body: ∅
+ └── @ LambdaNode (location: (12,0)-(13,1))
+ ├── locals: [:a, :b, :c]
+ ├── operator_loc: (12,0)-(12,2) = "->"
+ ├── opening_loc: (12,12)-(12,13) = "{"
+ ├── closing_loc: (13,0)-(13,1) = "}"
+ ├── parameters:
+ │ @ BlockParametersNode (location: (12,2)-(12,11))
+ │ ├── parameters:
+ │ │ @ ParametersNode (location: (12,3)-(12,7))
+ │ │ ├── requireds: (length: 2)
+ │ │ │ ├── @ RequiredParameterNode (location: (12,3)-(12,4))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ └── name: :a
+ │ │ │ └── @ RequiredParameterNode (location: (12,6)-(12,7))
+ │ │ │ ├── flags: ∅
+ │ │ │ └── name: :b
+ │ │ ├── optionals: (length: 0)
+ │ │ ├── rest: ∅
+ │ │ ├── posts: (length: 0)
+ │ │ ├── keywords: (length: 0)
+ │ │ ├── keyword_rest: ∅
+ │ │ └── block: ∅
+ │ ├── locals: (length: 1)
+ │ │ └── @ BlockLocalVariableNode (location: (12,9)-(12,10))
+ │ │ ├── flags: ∅
+ │ │ └── name: :c
+ │ ├── opening_loc: (12,2)-(12,3) = "("
+ │ └── closing_loc: (12,10)-(12,11) = ")"
+ └── body: ∅