added support for __newindex

This commit is contained in:
2020-11-24 15:16:37 -06:00
parent d2093098a4
commit bb11b3b309
4 changed files with 29 additions and 4 deletions

View File

@@ -42,6 +42,8 @@ CState *cosmoV_newState() {
// setup all strings used by the VM
state->iStrings[ISTRING_INIT] = cosmoO_copyString(state, "__init", 6);
state->iStrings[ISTRING_INDEX] = cosmoO_copyString(state, "__index", 7);
state->iStrings[ISTRING_NEWINDEX] = cosmoO_copyString(state, "__newindex", 10);
return state;
}