106 lines
1.7 KiB
Plaintext
106 lines
1.7 KiB
Plaintext
==================
|
|
Simple Function
|
|
==================
|
|
|
|
function { "Hiya" }
|
|
|
|
---
|
|
|
|
(root
|
|
(item
|
|
(statement
|
|
(expression
|
|
(value
|
|
(function
|
|
(statement
|
|
(expression
|
|
(value
|
|
(string))))))))))
|
|
|
|
==================
|
|
Function Call
|
|
==================
|
|
|
|
(foobar "Hiya")
|
|
|
|
---
|
|
|
|
(root
|
|
(item
|
|
(statement
|
|
(expression
|
|
(function_call
|
|
(identifier)
|
|
(expression
|
|
(value
|
|
(string))))))))
|
|
|
|
==================
|
|
Complex Function
|
|
==================
|
|
|
|
function <message number> {
|
|
(output message)
|
|
(output number)
|
|
}
|
|
|
|
---
|
|
|
|
(root
|
|
(item
|
|
(statement
|
|
(expression
|
|
(value
|
|
(function
|
|
(identifier)
|
|
(identifier)
|
|
(statement
|
|
(expression
|
|
(tool_call
|
|
(output
|
|
(expression
|
|
(identifier))))))
|
|
(statement
|
|
(expression
|
|
(tool_call
|
|
(output
|
|
(expression
|
|
(identifier))))))))))))
|
|
|
|
==================
|
|
Complex Function Call
|
|
==================
|
|
|
|
(foobar
|
|
"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))))))))))
|