Tweak, but I need a decompiler now

This commit is contained in:
2026-04-10 16:19:03 +10:00
parent 547229e150
commit 66155fa213
2 changed files with 19 additions and 5 deletions

View File

@@ -1,6 +1,20 @@
/*
{
fn hello() {
print "Hello world"; print "Hello world";
}
hello();
}
*/
{
fn hello(arg) {
print arg;
}
hello("world");
}
var answer = 42;
var question = 69;
print answer + question;

View File

@@ -209,7 +209,7 @@ static unsigned int emitParameters(Toy_Bytecode* mb, Toy_Ast* ast) {
//emit to the param index //emit to the param index
EMIT_INT(&mb, param, dataAddr); EMIT_INT(&mb, param, dataAddr);
EMIT_INT(&mb, param, TOY_VALUE_UNKNOWN); //TODO: encode function parameter types properly EMIT_INT(&mb, param, ast->value.value.type);
//this returns the number of written parameters //this returns the number of written parameters
return 1; return 1;