tree-sitter-dust/corpus/functions.txt

110 lines
1.8 KiB
Plaintext
Raw Normal View History

2023-09-29 18:32:18 +00:00
==================
Simple Function
==================
2023-10-06 10:18:02 +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
2023-10-09 18:39:47 +00:00
(item
(statement
(expression
(value
(string)))))))))))
2023-09-29 18:32:18 +00:00
2023-10-01 01:12:35 +00:00
==================
Function Call
==================
2023-10-06 17:32:49 +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
==================
2023-10-06 10:18:02 +00:00
function <message number> {
2023-10-06 17:32:49 +00:00
(output message)
(output number)
2023-09-29 18:32:18 +00:00
}
---
(root
(item
(statement
2023-10-01 05:13:29 +00:00
(expression
(value
(function
(identifier)
(identifier)
2023-10-09 18:39:47 +00:00
(item
(statement
(expression
(function_call
2023-10-10 19:50:57 +00:00
(tool)
2023-10-06 20:19:17 +00:00
(expression
2023-10-09 18:39:47 +00:00
(identifier)))))
(statement
(expression
(function_call
2023-10-10 19:50:57 +00:00
(tool)
2023-10-06 20:19:17 +00:00
(expression
(identifier))))))))))))
2023-10-06 12:16:34 +00:00
==================
Complex Function Call
==================
2023-10-06 17:32:49 +00:00
(foobar
2023-10-06 12:16:34 +00:00
"hi"
42
{
x = 1
y = 2
}
)
---
(root
(item
(statement
(expression
(function_call
(identifier)
(expression
(value
(string)))
(expression
(value
(integer)))
(expression
(value
(map
(identifier)
2023-10-09 18:39:47 +00:00
(expression
(value
(integer)))
2023-10-06 12:16:34 +00:00
(identifier)
2023-10-09 18:39:47 +00:00
(expression
(value
(integer)))))))))))