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

80 lines
2.1 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
================================================================================
2023-12-30 01:14:03 +00:00
async { output ('Whaddup') }
2023-11-11 01:44:03 +00:00
--------------------------------------------------------------------------------
(root
2023-11-11 01:44:03 +00:00
(statement
2024-02-16 15:55:15 +00:00
(statement_kind
(block
(statement
(statement_kind
2023-11-30 00:23:42 +00:00
(expression
2024-02-16 15:55:15 +00:00
(function_call
(function_expression
(identifier))
(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
2024-02-16 15:55:15 +00:00
(statement_kind
(block
(statement
(statement_kind
(if_else
(if
2023-11-12 18:20:41 +00:00
(expression
2024-02-16 15:55:15 +00:00
(logic
2023-11-12 18:20:41 +00:00
(expression
2024-02-16 15:55:15 +00:00
(math
(expression
(value
(integer)))
(math_operator)
(expression
(value
(integer)))))
(logic_operator)
2023-11-12 18:20:41 +00:00
(expression
(value
(integer)))))
2024-02-16 15:55:15 +00:00
(block
(statement
(statement_kind
(expression
(value
(boolean)))))))
(else
(block
(statement
(statement_kind
(expression
(value
(boolean))))))))))
(statement
(statement_kind
(expression
(value
(string)))))))))