Dictionaries -> Tables

Tables are going to become a more generic form of data storage. While objects will be "stateful", tables will remain static.

'{}' now refers to an object declaration, '[]' will be reserved for tables.
This commit is contained in:
2021-01-08 14:37:36 -06:00
parent e57c194837
commit 824c0e89b9
9 changed files with 123 additions and 92 deletions

View File

@@ -97,9 +97,9 @@ void blackenObject(CState *state, CObj *obj) {
markTable(state, &cobj->tbl);
break;
}
case COBJ_DICT: { // dictionaries are just wrappers for CTable
CObjDict *dict = (CObjDict*)obj;
markTable(state, &dict->tbl);
case COBJ_TABLE: { // tables are just wrappers for CTable
CObjTable *tbl = (CObjTable*)obj;
markTable(state, &tbl->tbl);
break;
}
case COBJ_UPVALUE: {