acorn-walk
Advanced tools
Comparing version 6.0.1 to 6.1.0
@@ -0,1 +1,7 @@ | ||
## 6.1.0 (2018-09-28) | ||
### New features | ||
The walker now walks `TemplateElement` nodes. | ||
## 6.0.1 (2018-09-14) | ||
@@ -2,0 +8,0 @@ |
@@ -339,3 +339,3 @@ // AST walker module for Mozilla Parser API compatible trees | ||
base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; | ||
base.SequenceExpression = base.TemplateLiteral = function (node, st, c) { | ||
base.SequenceExpression = function (node, st, c) { | ||
for (var i = 0, list = node.expressions; i < list.length; i += 1) | ||
@@ -348,2 +348,18 @@ { | ||
}; | ||
base.TemplateLiteral = function (node, st, c) { | ||
for (var i = 0, list = node.quasis; i < list.length; i += 1) | ||
{ | ||
var quasi = list[i]; | ||
c(quasi, st); | ||
} | ||
for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) | ||
{ | ||
var expr = list$1[i$1]; | ||
c(expr, st, "Expression"); | ||
} | ||
}; | ||
base.TemplateElement = ignore; | ||
base.UnaryExpression = base.UpdateExpression = function (node, st, c) { | ||
@@ -350,0 +366,0 @@ c(node.argument, st, "Expression"); |
@@ -345,3 +345,3 @@ (function (global, factory) { | ||
base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration; | ||
base.SequenceExpression = base.TemplateLiteral = function (node, st, c) { | ||
base.SequenceExpression = function (node, st, c) { | ||
for (var i = 0, list = node.expressions; i < list.length; i += 1) | ||
@@ -354,2 +354,18 @@ { | ||
}; | ||
base.TemplateLiteral = function (node, st, c) { | ||
for (var i = 0, list = node.quasis; i < list.length; i += 1) | ||
{ | ||
var quasi = list[i]; | ||
c(quasi, st); | ||
} | ||
for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) | ||
{ | ||
var expr = list$1[i$1]; | ||
c(expr, st, "Expression"); | ||
} | ||
}; | ||
base.TemplateElement = ignore; | ||
base.UnaryExpression = base.UpdateExpression = function (node, st, c) { | ||
@@ -356,0 +372,0 @@ c(node.argument, st, "Expression"); |
@@ -7,3 +7,3 @@ { | ||
"module": "dist/walk.mjs", | ||
"version": "6.0.1", | ||
"version": "6.1.0", | ||
"engines": {"node": ">=0.4.0"}, | ||
@@ -10,0 +10,0 @@ "maintainers": [ |
@@ -53,3 +53,3 @@ # Acorn AST walker | ||
const acorn = require("acorn") | ||
const walk = require("acorn/dist/walk") | ||
const walk = require("acorn-walk") | ||
@@ -69,3 +69,3 @@ walk.simple(acorn.parse("let x = 10"), { | ||
const acorn = require("acorn") | ||
const walk = require("acorn/dist/walk") | ||
const walk = require("acorn-walk") | ||
@@ -105,3 +105,3 @@ walk.ancestor(acorn.parse("foo('hi')"), { | ||
const acorn = require("acorn") | ||
const walk = require("acorn/dist/walk") | ||
const walk = require("acorn-walk") | ||
@@ -108,0 +108,0 @@ walk.full(acorn.parse("1 + 1"), node => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
95744
807