tree-sitter-dust/corpus/functions.txt

69 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-09-29 18:32:18 +00:00
==================
Simple Function
==================
2023-10-05 20:49:03 +00:00
function <> { "Hiya" }
2023-09-29 18:32:18 +00:00
---
(root
(item
(statement
2023-10-01 05:13:29 +00:00
(expression
(value
(function
(statement
(expression
(value
(string))))))))))
2023-09-29 18:32:18 +00:00
2023-10-01 01:12:35 +00:00
==================
Function Call
==================
2023-10-05 20:49:03 +00:00
foobar {"Hiya"}
2023-10-01 01:12:35 +00:00
---
(root
(item
(statement
2023-10-01 05:13:29 +00:00
(expression
(function_call
(identifier)
2023-10-01 10:09:29 +00:00
(expression
(value
(string))))))))
2023-10-01 01:12:35 +00:00
2023-09-29 18:32:18 +00:00
==================
Complex Function
==================
function <message, number> {
output message
output number
}
---
(root
(item
(statement
2023-10-01 05:13:29 +00:00
(expression
(value
(function
(identifier)
(identifier)
(statement
(expression
(identifier)))
(statement
(expression
(identifier)))
(statement
(expression
(identifier)))
(statement
(expression
(identifier)))))))))