[Pkg-javascript-commits] [node-acorn-jsx] 375/484: Make tests pass again for loose parser
Bastien Roucariès
rouca at moszumanska.debian.org
Sat Aug 19 14:20:58 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 459a16926227fa506d145910cc2e456b86fe6b6d
Author: Marijn Haverbeke <marijnh at gmail.com>
Date: Sun Jan 4 22:34:42 2015 +0100
Make tests pass again for loose parser
Issue #181
---
acorn_loose.js | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/acorn_loose.js b/acorn_loose.js
index a0d822a..74a5816 100644
--- a/acorn_loose.js
+++ b/acorn_loose.js
@@ -304,6 +304,7 @@
case "ObjectPattern":
case "ArrayPattern":
case "SpreadElement":
+ case "AssignmentPattern":
return expr;
default:
@@ -983,6 +984,13 @@
case "SpreadElement":
node.argument = toAssignable(node.argument);
break;
+
+ case "AssignmentExpression":
+ if (node.operator === "=")
+ node.type = "AssignmentPattern";
+ else
+ unexpected(node.left.end);
+ break;
}
}
return checkLVal(node);
--
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