mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Functions are successfully called, read more
Return keyword is not yet implemented. Functions are untested. See #163
This commit is contained in:
@@ -213,6 +213,16 @@ void Toy_private_emitAstFunctionDeclaration(Toy_Bucket** bucketHandle, Toy_Ast**
|
||||
(*astHandle) = tmp;
|
||||
}
|
||||
|
||||
void Toy_private_emitAstFunctionInvokation(Toy_Bucket** bucketHandle, Toy_Ast** astHandle, Toy_Ast* args) {
|
||||
Toy_Ast* tmp = (Toy_Ast*)Toy_partitionBucket(bucketHandle, sizeof(Toy_Ast));
|
||||
|
||||
tmp->type = TOY_AST_FN_INVOKE;
|
||||
tmp->fnInvoke.function = (*astHandle);
|
||||
tmp->fnInvoke.args = args;
|
||||
|
||||
(*astHandle) = tmp;
|
||||
}
|
||||
|
||||
void Toy_private_emitAstPass(Toy_Bucket** bucketHandle, Toy_Ast** astHandle) {
|
||||
Toy_Ast* tmp = (Toy_Ast*)Toy_partitionBucket(bucketHandle, sizeof(Toy_Ast));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user