1
0

68 lines
1.7 KiB
Plaintext
Raw Normal View History

2023-11-14 22:26:32 -05:00
================================================================================
Simple Yield
================================================================================
2023-12-29 21:15:03 -05:00
1 -> output
2023-11-14 22:26:32 -05:00
--------------------------------------------------------------------------------
2023-11-15 20:46:45 -05:00
(root
(statement
(expression
(yield
(expression
(value
(integer)))
(function_expression
2024-01-01 04:59:27 -05:00
(value
(built_in_value)))))))
2023-11-15 20:46:45 -05:00
2023-11-14 22:26:32 -05:00
================================================================================
Yield Chain
================================================================================
2023-12-29 21:15:03 -05:00
x -> foo -> bar -> abc
2023-11-14 22:26:32 -05:00
--------------------------------------------------------------------------------
2023-11-15 20:46:45 -05:00
(root
(statement
(expression
(yield
(expression
(yield
(expression
(yield
(expression
(identifier))
(function_expression
2023-12-02 02:34:23 -05:00
(identifier))))
(function_expression
2023-12-02 02:34:23 -05:00
(identifier))))
(function_expression
2023-12-02 02:34:23 -05:00
(identifier))))))
2023-12-29 21:15:03 -05:00
================================================================================
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)))))))))