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

72 lines
1.7 KiB
Plaintext
Raw 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-11-30 16:05:09 +00:00
(identifier)
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)))))))