function calls work!!!

This commit is contained in:
SpookyDervish
2025-10-15 06:59:29 +11:00
parent 170146ee7e
commit 049db7c53a
6 changed files with 119 additions and 15 deletions

55
debug/ast.json Normal file
View File

@@ -0,0 +1,55 @@
{
"type": "Program",
"statements": [
{
"FunctionStatement": {
"type": "FunctionStatement",
"name": {
"type": "IdentifierLiteral",
"value": "test"
},
"return_type": "Int",
"parameters": [],
"body": {
"type": "BlockStatement",
"statements": [
{
"type": "ReturnStatement",
"return_value": {
"type": "IntegerLiteral",
"value": 123
}
}
]
}
}
},
{
"FunctionStatement": {
"type": "FunctionStatement",
"name": {
"type": "IdentifierLiteral",
"value": "main"
},
"return_type": "Int",
"parameters": [],
"body": {
"type": "BlockStatement",
"statements": [
{
"type": "ReturnStatement",
"return_value": {
"type": "CallExpression",
"function": {
"type": "IdentifierLiteral",
"value": "test"
},
"arguments": []
}
}
]
}
}
}
]
}