Fix string literals not parsing correctly

This commit is contained in:
phantamanta44 2021-01-26 22:23:20 -06:00
parent 2adb962b53
commit 1e9f3e1ab5

View file

@ -175,7 +175,7 @@ const compileQueryExpr = (function() {
continue;
}
// parse a string literal
if ((m = /^"[^"]+"/.exec(exprStr.substring(col))) !== null) {
if ((m = /^"([^"]+)"/.exec(exprStr.substring(col))) !== null) {
tokens.push({ type: 'str', value: m[1] });
col += m[0].length;
continue;
@ -377,6 +377,7 @@ const compileQueryExpr = (function() {
case 'str': {
const lit = tokens.here.value;
tokens.advance();
console.log(lit);
return (i, ie) => lit;
}
case 'id':