2023-10-16 20:36:07 +00:00
|
|
|
==================
|
|
|
|
Simple Async Statements
|
|
|
|
==================
|
|
|
|
|
2023-10-16 20:47:43 +00:00
|
|
|
async { (output 'Whaddup') }
|
2023-10-16 20:36:07 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(async
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(expression
|
|
|
|
(function_call
|
|
|
|
(tool)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(string)))))))))))
|
|
|
|
|
|
|
|
==================
|
2023-10-16 20:47:43 +00:00
|
|
|
Complex Async Statements
|
2023-10-16 20:36:07 +00:00
|
|
|
==================
|
|
|
|
|
2023-10-16 20:47:43 +00:00
|
|
|
async {
|
|
|
|
if 1 % 2 == 0 {
|
2023-10-16 20:36:07 +00:00
|
|
|
(output 'true')
|
2023-10-16 20:47:43 +00:00
|
|
|
} else {
|
|
|
|
(output 'false')
|
|
|
|
}
|
2023-10-16 20:36:07 +00:00
|
|
|
|
2023-10-16 20:47:43 +00:00
|
|
|
(output 'foobar')
|
|
|
|
}
|
2023-10-16 20:36:07 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
(root
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(async
|
|
|
|
(item
|
|
|
|
(statement
|
|
|
|
(if_else
|
|
|
|
(if
|
|
|
|
(expression
|
|
|
|
(logic
|
|
|
|
(expression
|
|
|
|
(math
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))
|
|
|
|
(math_operator)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))))
|
|
|
|
(logic_operator)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(integer)))))
|
|
|
|
(statement
|
|
|
|
(expression
|
|
|
|
(function_call
|
|
|
|
(tool)
|
|
|
|
(expression
|
|
|
|
(value
|
|
|
|
(string)))))))
|
|
|
|
(else
|
|
|
|
(statement
|
|
|
|
(expression
|
|
|
|
(function_call
|
|
|
|
(tool)
|
|
|
|
(expression
|
|
|
|
(value
|
2023-10-16 20:47:43 +00:00
|
|
|
(string)))))))))
|
2023-10-16 20:36:07 +00:00
|
|
|
(statement
|
|
|
|
(expression
|
|
|
|
(function_call
|
|
|
|
(tool)
|
|
|
|
(expression
|
|
|
|
(value
|
2023-10-16 20:47:43 +00:00
|
|
|
(string)))))))))))
|