[Pkg-javascript-commits] [node-acorn-jsx] 399/484: Restore patch 9f7cb552648829796ab4d6836d08246e95f16b9d to original shape
Bastien Roucariès
rouca at moszumanska.debian.org
Sat Aug 19 14:21:02 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 a1d2561cfaa0f5070cf3b431bd154c0ebdf946cb
Author: Marijn Haverbeke <marijnh at gmail.com>
Date: Tue Jan 20 12:02:30 2015 +0100
Restore patch 9f7cb552648829796ab4d6836d08246e95f16b9d to original shape
And make loose parser handle stray class semicolons
Issue #190
---
acorn.js | 3 +--
acorn_loose.js | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/acorn.js b/acorn.js
index 6ba8f97..95dd23b 100644
--- a/acorn.js
+++ b/acorn.js
@@ -2524,8 +2524,7 @@
classBody.body = [];
expect(_braceL);
while (!eat(_braceR)) {
- while (eat(_semi));
- if (tokType === _braceR) continue;
+ if (eat(_semi)) continue;
var method = startNode();
var isGenerator = eat(_star);
parsePropertyName(method);
diff --git a/acorn_loose.js b/acorn_loose.js
index 03d92b7..a6542ee 100644
--- a/acorn_loose.js
+++ b/acorn_loose.js
@@ -854,6 +854,7 @@
eat(tt.braceL);
if (curIndent + 1 < indent) { indent = curIndent; line = curLineStart; }
while (!closes(tt.braceR, indent, line)) {
+ if (isClass && semicolon()) continue;
var prop = startNode(), isGenerator;
if (options.ecmaVersion >= 6) {
if (isClass) {
@@ -904,7 +905,6 @@
if (isClass) {
node.body.body.push(finishNode(prop, "MethodDefinition"));
- semicolon();
} else {
node.properties.push(finishNode(prop, "Property"));
eat(tt.comma);
--
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