From e5681aa48b464fc194b4445670e7bf027f314562 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 15 Apr 2021 13:50:44 -0300 Subject: parser error throwing/handling bugfixes --- upd8.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/upd8.js b/upd8.js index 9e2ed2e..4555b00 100755 --- a/upd8.js +++ b/upd8.js @@ -1000,6 +1000,8 @@ const replacerSpec = { let string = ''; let iString = 0; + stopped = false; + const pushTextNode = () => { if (string.length) { nodes.push({i: iString, type: 'text', data: string}); @@ -1149,7 +1151,7 @@ const replacerSpec = { throw errorNode; } - const { i, message } = errorNode; + const { i, data: { message } } = errorNode; // TODO: Visual line/surrounding characters presentation! throw new SyntaxError(`Parse error (at pos ${i}): ${message}`); -- cgit 1.3.0-6-gf8a5