extended lexer, fixed table shrinking

This commit is contained in:
2020-11-25 23:34:02 -06:00
parent bb11b3b309
commit 0745fd10a9
6 changed files with 78 additions and 7 deletions

View File

@@ -372,7 +372,7 @@ static void number(CParseState *pstate, bool canAssign) {
}
static void string(CParseState *pstate, bool canAssign) {
CObjString *strObj = cosmoO_copyString(pstate->state, pstate->previous.start + 1, pstate->previous.length - 2);
CObjString *strObj = cosmoO_takeString(pstate->state, pstate->previous.start, pstate->previous.length);
writeConstant(pstate, cosmoV_newObj((CObj*)strObj));
}