[Pkg-javascript-commits] [node-acorn-jsx] 418/484: Add ES6 patterns to util/walk.js
Bastien Roucariès
rouca at moszumanska.debian.org
Sat Aug 19 14:21:04 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 2e9180f0417122228e4f84426dba86752ccaa1e9
Author: Ingvar Stepanyan <me at rreverser.com>
Date: Fri Jan 23 15:33:28 2015 +0200
Add ES6 patterns to util/walk.js
---
util/walk.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/util/walk.js b/util/walk.js
index da7ca9f..5a09df7 100644
--- a/util/walk.js
+++ b/util/walk.js
@@ -200,7 +200,7 @@
base.ReturnStatement = base.YieldExpression = function(node, st, c) {
if (node.argument) c(node.argument, st, "Expression");
};
- base.ThrowStatement = base.SpreadElement = function(node, st, c) {
+ base.ThrowStatement = base.SpreadElement = base.RestElement = function(node, st, c) {
c(node.argument, st, "Expression");
};
base.TryStatement = function(node, st, c) {
@@ -249,13 +249,13 @@
base.Expression = skipThrough;
base.ThisExpression = ignore;
- base.ArrayExpression = function(node, st, c) {
+ base.ArrayExpression = base.ArrayPattern = function(node, st, c) {
for (var i = 0; i < node.elements.length; ++i) {
var elt = node.elements[i];
if (elt) c(elt, st, "Expression");
}
};
- base.ObjectExpression = function(node, st, c) {
+ base.ObjectExpression = base.ObjectPattern = function(node, st, c) {
for (var i = 0; i < node.properties.length; ++i)
c(node.properties[i], st);
};
@@ -267,7 +267,7 @@
base.UnaryExpression = base.UpdateExpression = function(node, st, c) {
c(node.argument, st, "Expression");
};
- base.BinaryExpression = base.AssignmentExpression = base.LogicalExpression = function(node, st, c) {
+ base.BinaryExpression = base.AssignmentExpression = base.AssignmentPattern = base.LogicalExpression = function(node, st, c) {
c(node.left, st, "Expression");
c(node.right, st, "Expression");
};
--
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