Implemented the following attributes:

* String.length
* String.asUpper
* String.asLower
* array.length
* array.pushBack(x)
* array.popBack()

The remaining attributes are listed in 'toy_attributes.h'
This commit is contained in:
2026-04-24 17:31:17 +10:00
parent b589392b9e
commit 88e9794952
10 changed files with 189 additions and 45 deletions
+1 -1
View File
@@ -800,7 +800,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;
//URGENT: flip the order of target & value, to allow chained assignment AND multiple return values
//BUG: flip the order of target & value, to allow chained assignment AND multiple return values
//target is a variable name
if (ast.target->type == TOY_AST_VALUE && TOY_VALUE_IS_STRING(ast.target->value.value)) {