63 lines
1.7 KiB
Plaintext
63 lines
1.7 KiB
Plaintext
|
================================================================================
|
||
|
Simple Yield
|
||
|
================================================================================
|
||
|
|
||
|
1 -> output
|
||
|
|
||
|
--------------------------------------------------------------------------------
|
||
|
|
||
|
(root
|
||
|
(block
|
||
|
(statement
|
||
|
(expression
|
||
|
(yield
|
||
|
(expression
|
||
|
(value
|
||
|
(integer)))
|
||
|
(function_call
|
||
|
(built_in_function)))))))
|
||
|
|
||
|
================================================================================
|
||
|
Long Yield
|
||
|
================================================================================
|
||
|
|
||
|
[1, 2, 3]
|
||
|
-> add_one
|
||
|
-> subtract_one
|
||
|
-> foobar
|
||
|
-> output
|
||
|
|
||
|
--------------------------------------------------------------------------------
|
||
|
|
||
|
(root
|
||
|
(block
|
||
|
(statement
|
||
|
(expression
|
||
|
(yield
|
||
|
(expression
|
||
|
(yield
|
||
|
(expression
|
||
|
(yield
|
||
|
(expression
|
||
|
(yield
|
||
|
(expression
|
||
|
(value
|
||
|
(list
|
||
|
(expression
|
||
|
(value
|
||
|
(integer)))
|
||
|
(expression
|
||
|
(value
|
||
|
(integer)))
|
||
|
(expression
|
||
|
(value
|
||
|
(integer))))))
|
||
|
(function_call
|
||
|
(identifier))))
|
||
|
(function_call
|
||
|
(identifier))))
|
||
|
(function_call
|
||
|
(identifier))))
|
||
|
(function_call
|
||
|
(built_in_function)))))))
|