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

76 lines
1.5 KiB
Plaintext
Raw Normal View History

==================
Simple Async Statements
==================
async { (output 'Whaddup') }
---
(root
2023-10-31 13:31:10 +00:00
(block
(statement
(async
(block
(statement
2023-10-31 05:09:29 +00:00
(expression
2023-10-31 17:04:22 +00:00
(function_call
2023-10-31 19:21:13 +00:00
(built_in_function
(expression
(value
(string))))))))))))
==================
Complex Async Statements
==================
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'
}
---
(root
2023-10-31 13:31:10 +00:00
(block
(statement
(async
(block
(statement
(if_else
(if
(expression
2023-10-31 13:31:10 +00:00
(logic
(expression
2023-10-31 13:31:10 +00:00
(math
(expression
(value
(integer)))
(math_operator)
(expression
(value
(integer)))))
(logic_operator)
(expression
2023-10-31 05:09:29 +00:00
(value
2023-10-31 10:21:21 +00:00
(integer)))))
2023-10-31 13:31:10 +00:00
(block
(statement
(expression
(value
(boolean))))))
(else
(block
(statement
(expression
(value
(boolean))))))))
(statement
(expression
(value
(string)))))))))