[Pkg-javascript-commits] [node-acorn-jsx] 141/484: Improve error message for ++/re/
Bastien Roucariès
rouca at moszumanska.debian.org
Sat Aug 19 14:20:16 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-acorn-jsx.
commit c152be4a2e8383a21c573ba0b2495afc9ae84643
Author: Marijn Haverbeke <marijnh at gmail.com>
Date: Wed Aug 28 16:22:30 2013 +0200
Improve error message for ++/re/
Closes #54
---
acorn.js | 1 +
index.html | 1 +
2 files changed, 2 insertions(+)
diff --git a/acorn.js b/acorn.js
index 4d5b23e..ade6e3f 100644
--- a/acorn.js
+++ b/acorn.js
@@ -1476,6 +1476,7 @@
var node = startNode(), update = tokType.isUpdate;
node.operator = tokVal;
node.prefix = true;
+ tokRegexpAllowed = true;
next();
node.argument = parseMaybeUnary();
if (update) checkLVal(node.argument);
diff --git a/index.html b/index.html
index 968745e..4099e39 100644
--- a/index.html
+++ b/index.html
@@ -1082,6 +1082,7 @@ operator that has a lower precedence than the set it is parsing.</p>
<span class="kd">var</span> <span class="nx">node</span> <span class="o">=</span> <span class="nx">startNode</span><span class="p">(),</span> <span class="nx">update</span> <span class="o">=</span> <span class="nx">tokType</span><span class="p">.</span><span class="nx">isUpdate</span><span class="p">;</span>
<span class="nx">node</span><span class="p">.</span><span class="nx">operator</span> <span class="o">=</span> <span class="nx">tokVal</span><span class="p">;</span>
<span class="nx">node</span><span class="p">.</span><span class="nx">prefix</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
+ <span class="nx">tokRegexpAllowed</span> <span class="o">=</span> <span class="kc">true</span><span class="p">;</span>
<span class="nx">next</span><span class="p">();</span>
<span class="nx">node</span><span class="p">.</span><span class="nx">argument</span> <span class="o">=</span> <span class="nx">parseMaybeUnary</span><span class="p">();</span>
<span class="k">if</span> <span class="p">(</span><span class="nx">update</span><span class="p">)</span> <span class="nx">checkLVal</span><span class="p">(</span><span class="nx">node</span><span class="p">.</span><span class="nx">argument</span><span class="p">);</span>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-acorn-jsx.git
More information about the Pkg-javascript-commits
mailing list