mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
AST test is passing
This commit is contained in:
@@ -185,9 +185,9 @@ typedef struct Toy_AstPrint {
|
||||
typedef struct Toy_AstVarDeclare {
|
||||
Toy_AstType type;
|
||||
Toy_String* name;
|
||||
Toy_Ast* expr;
|
||||
Toy_ValueType valueType;
|
||||
bool constant;
|
||||
Toy_Ast* expr;
|
||||
} Toy_AstVarDeclare;
|
||||
|
||||
typedef struct Toy_AstVarAssign {
|
||||
|
||||
@@ -795,7 +795,7 @@ static unsigned int writeInstructionVarDeclare(Toy_Bytecode** mb, Toy_AstVarDecl
|
||||
static unsigned int writeInstructionAssign(Toy_Bytecode** mb, Toy_AstVarAssign ast, bool chainedAssignment) {
|
||||
unsigned int result = 0;
|
||||
|
||||
//target is a name string
|
||||
//target is a variable name
|
||||
if (ast.target->type == TOY_AST_VALUE && TOY_VALUE_IS_STRING(ast.target->value.value)) {
|
||||
//name string
|
||||
Toy_String* target = TOY_VALUE_AS_STRING(ast.target->value.value);
|
||||
|
||||
Reference in New Issue
Block a user