1
0
dust/tree-sitter-dust/corpus/yield.txt

68 lines
1.7 KiB
Plaintext

================================================================================
Simple Yield
================================================================================
1 -> output
--------------------------------------------------------------------------------
(root
(statement
(expression
(yield
(expression
(value
(integer)))
(function_expression
(identifier
(built_in_function)))))))
================================================================================
Yield Chain
================================================================================
x -> foo -> bar -> abc
--------------------------------------------------------------------------------
(root
(statement
(expression
(yield
(expression
(yield
(expression
(yield
(expression
(identifier))
(function_expression
(identifier))))
(function_expression
(identifier))))
(function_expression
(identifier))))))
================================================================================
Yielded Function Call
================================================================================
x -> foo(1)()
--------------------------------------------------------------------------------
(root
(statement
(expression
(function_call
(function_expression
(function_call
(function_expression
(yield
(expression
(identifier))
(function_expression
(identifier))))
(expression
(value
(integer)))))))))