1
0

Add yield syntax

This commit is contained in:
Jeff 2023-11-15 20:46:45 -05:00
parent 1d6b49ba25
commit 274891d96e
2 changed files with 29 additions and 2 deletions

View File

@ -1,4 +1,4 @@
1 -> output 1 -> (output)
add_one = |list| { add_one = |list| {
transform number in list { transform number in list {
@ -6,4 +6,4 @@ add_one = |list| {
} }
} }
[1, 2, 3] -> add_one [1, 2, 3] -> (add_one)

View File

@ -6,6 +6,16 @@ Simple Yield
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
(root
(statement
(expression
(yield
(expression
(value
(integer)))
(function_call
(built_in_function))))))
================================================================================ ================================================================================
Yield Chain Yield Chain
================================================================================ ================================================================================
@ -13,3 +23,20 @@ Yield Chain
x -> (foo) -> (bar) -> (abc) x -> (foo) -> (bar) -> (abc)
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
(root
(statement
(expression
(yield
(expression
(yield
(expression
(yield
(expression
(identifier))
(function_call
(identifier))))
(function_call
(identifier))))
(function_call
(identifier))))))