mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-05-07 09:20:11 +10:00
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:
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "toy_value.h"
|
||||
#include "toy_vm.h"
|
||||
|
||||
Toy_Value handleStringAttributes(Toy_VM* vm, Toy_Value compound, Toy_Value attribute);
|
||||
Toy_Value handleArrayAttributes(Toy_VM* vm, Toy_Value compound, Toy_Value attribute);
|
||||
Toy_Value handleTableAttributes(Toy_VM* vm, Toy_Value compound, Toy_Value attribute);
|
||||
|
||||
// string.length
|
||||
// string.asUpper
|
||||
// string.asLower
|
||||
// array.length
|
||||
// array.pushBack(x)
|
||||
// array.popBack()
|
||||
// array.forEach(fn) // fn(x) -> void
|
||||
// array.sort(fn) // fn(a,b) -> int
|
||||
// table.length
|
||||
// table.insert(x)
|
||||
// table.hasKey(x)
|
||||
// table.remove(x)
|
||||
// table.forEach(fn) // fn(x) -> void
|
||||
Reference in New Issue
Block a user