mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-19 16:54:08 +10:00
Functions are WIP, read more
They're no-ops in compilation for now, and param types aren't parsed. 'return' keyword needs to be implemented. Was distracted by bugfixes in v2 and v2-docs.
This commit is contained in:
@@ -899,10 +899,11 @@ static unsigned int writeInstructionAccess(Toy_ModuleBuilder** mb, Toy_AstVarAcc
|
||||
return 1;
|
||||
}
|
||||
|
||||
//routine structure
|
||||
// static void writeModuleBuilderParam(Toy_ModuleBuilder* mb) {
|
||||
// //
|
||||
// }
|
||||
static unsigned int writeInstructionFnDeclare(Toy_ModuleBuilder** mb, Toy_AstFnDeclare ast) {
|
||||
(void)mb;
|
||||
(void)ast;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int writeModuleBuilderCode(Toy_ModuleBuilder** mb, Toy_Ast* ast) {
|
||||
if (ast == NULL) {
|
||||
@@ -1010,6 +1011,10 @@ static unsigned int writeModuleBuilderCode(Toy_ModuleBuilder** mb, Toy_Ast* ast)
|
||||
result += writeInstructionAccess(mb, ast->varAccess);
|
||||
break;
|
||||
|
||||
case TOY_AST_FN_DECLARE:
|
||||
result += writeInstructionFnDeclare(mb, ast->fnDeclare);
|
||||
break;
|
||||
|
||||
case TOY_AST_PASS:
|
||||
//NO-OP
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user