1
0
dust/tree-sitter-dust/corpus/async.txt

74 lines
1.8 KiB
Plaintext
Raw Permalink Normal View History

2023-11-11 01:44:03 +00:00
================================================================================
Simple Async Statements
2023-11-11 01:44:03 +00:00
================================================================================
async { (output 'Whaddup') }
2023-11-11 01:44:03 +00:00
--------------------------------------------------------------------------------
(root
2023-11-11 01:44:03 +00:00
(statement
2023-11-12 18:20:41 +00:00
(block
(statement
(expression
(function_call
2023-12-02 07:34:23 +00:00
(expression
2023-12-11 16:17:37 +00:00
(identifier
(built_in_function)))
2023-11-30 00:23:42 +00:00
(expression
(value
(string)))))))))
2023-11-11 01:44:03 +00:00
================================================================================
Complex Async Statements
2023-11-11 01:44:03 +00:00
================================================================================
async {
if 1 % 2 == 0 {
2023-10-31 05:09:29 +00:00
true
} else {
2023-10-31 05:09:29 +00:00
false
}
2023-10-31 05:09:29 +00:00
'foobar'
}
2023-11-11 01:44:03 +00:00
--------------------------------------------------------------------------------
(root
2023-11-11 01:44:03 +00:00
(statement
2023-11-12 18:20:41 +00:00
(block
(statement
(if_else
(if
(expression
(logic
(expression
(math
(expression
(value
(integer)))
(math_operator)
(expression
(value
(integer)))))
(logic_operator)
(expression
(value
(integer)))))
(block
(statement
(expression
(value
(boolean))))))
(else
(block
(statement
(expression
(value
(boolean))))))))
(statement
(expression
(value
(string)))))))