Add yield syntax
This commit is contained in:
parent
1d6b49ba25
commit
274891d96e
@ -1,4 +1,4 @@
|
||||
1 -> output
|
||||
1 -> (output)
|
||||
|
||||
add_one = |list| {
|
||||
transform number in list {
|
||||
@ -6,4 +6,4 @@ add_one = |list| {
|
||||
}
|
||||
}
|
||||
|
||||
[1, 2, 3] -> add_one
|
||||
[1, 2, 3] -> (add_one)
|
||||
|
@ -6,6 +6,16 @@ Simple Yield
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(root
|
||||
(statement
|
||||
(expression
|
||||
(yield
|
||||
(expression
|
||||
(value
|
||||
(integer)))
|
||||
(function_call
|
||||
(built_in_function))))))
|
||||
|
||||
================================================================================
|
||||
Yield Chain
|
||||
================================================================================
|
||||
@ -13,3 +23,20 @@ Yield Chain
|
||||
x -> (foo) -> (bar) -> (abc)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(root
|
||||
(statement
|
||||
(expression
|
||||
(yield
|
||||
(expression
|
||||
(yield
|
||||
(expression
|
||||
(yield
|
||||
(expression
|
||||
(identifier))
|
||||
(function_call
|
||||
(identifier))))
|
||||
(function_call
|
||||
(identifier))))
|
||||
(function_call
|
||||
(identifier))))))
|
||||
|
Loading…
Reference in New Issue
Block a user