added __tostring IString, added expressionPrecedence() to cparse.c

additional minor refactoring
This commit is contained in:
2021-01-03 17:33:10 -06:00
parent cb1d287c93
commit adb2381b4f
6 changed files with 84 additions and 43 deletions

View File

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