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

96 lines
2.4 KiB
Plaintext
Raw Normal View History

2023-11-03 23:39:34 +00:00
================================================================================
2023-11-04 01:16:55 +00:00
Simple Future
2023-11-03 23:39:34 +00:00
================================================================================
async { (output 'Whaddup') }
--------------------------------------------------------------------------------
(root
(block
(statement
(expression
(value
(future
(block
(statement
(expression
(function_call
(built_in_function
(expression
(value
(string))))))))))))))
================================================================================
2023-11-04 01:16:55 +00:00
Complex Future
2023-11-03 23:39:34 +00:00
================================================================================
async {
if 1 % 2 == 0 {
true
} else {
false
}
'foobar'
}
2023-11-04 01:16:55 +00:00
async { 123 }
'foo'
2023-11-03 23:39:34 +00:00
--------------------------------------------------------------------------------
(root
(block
(statement
(expression
(value
(future
(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
2023-11-04 01:16:55 +00:00
(string)))))))))
(statement
(expression
(value
(future
(block
(statement
(expression
(value
(integer)))))))))
(statement
(expression
(value
(string))))))