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
|
|
|
|
(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)
|
|
|
|
(statement
|
2023-10-06 17:32:49 +00:00
|
|
|
(expression
|
|
|
|
(tool_call
|
|
|
|
(tool)
|
|
|
|
(expression
|
|
|
|
(identifier)))))
|
2023-10-01 05:13:29 +00:00
|
|
|
(statement
|
|
|
|
(expression
|
2023-10-06 17:32:49 +00:00
|
|
|
(tool_call
|
|
|
|
(tool)
|
|
|
|
(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)
|
|
|
|
(value
|
|
|
|
(integer))
|
|
|
|
(identifier)
|
|
|
|
(value
|
|
|
|
(integer))))))))))
|