From 1e9f3e1ab529e312e600af4fa1244a60af6d6609 Mon Sep 17 00:00:00 2001 From: phantamanta44 Date: Tue, 26 Jan 2021 22:23:20 -0600 Subject: [PATCH] Fix string literals not parsing correctly --- query.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/query.js b/query.js index 17a7ec3..050721c 100644 --- a/query.js +++ b/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':