mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 06:44:07 +10:00
Tweak, but I need a decompiler now
This commit is contained in:
@@ -1,6 +1,20 @@
|
||||
print "Hello world";
|
||||
|
||||
var answer = 42;
|
||||
var question = 69;
|
||||
|
||||
print answer + question;
|
||||
/*
|
||||
{
|
||||
fn hello() {
|
||||
print "Hello world";
|
||||
}
|
||||
hello();
|
||||
}
|
||||
*/
|
||||
|
||||
{
|
||||
fn hello(arg) {
|
||||
print arg;
|
||||
}
|
||||
|
||||
hello("world");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ static unsigned int emitParameters(Toy_Bytecode* mb, Toy_Ast* ast) {
|
||||
|
||||
//emit to the param index
|
||||
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
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user