Fix string literals not parsing correctly
This commit is contained in:
parent
2adb962b53
commit
1e9f3e1ab5
1 changed files with 2 additions and 1 deletions
3
query.js
3
query.js
|
@ -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':
|
||||
|
|
Loading…
Add table
Reference in a new issue