shift-parser
Advanced tools
Comparing version 7.0.1 to 7.0.3
@@ -437,2 +437,21 @@ 'use strict'; | ||
}, { | ||
key: 'reduceForAwaitStatement', | ||
value: function reduceForAwaitStatement(node, _ref10) { | ||
var left = _ref10.left, | ||
right = _ref10.right, | ||
body = _ref10.body; | ||
left = left.recordForOfVars(); | ||
left = left.enforceDuplicateLexicallyDeclaredNames(DUPLICATE_BINDING); | ||
left = left.enforceConflictingLexicallyDeclaredNames(body.varDeclaredNames, DUPLICATE_BINDING); | ||
var s = _get(EarlyErrorChecker.prototype.__proto__ || Object.getPrototypeOf(EarlyErrorChecker.prototype), 'reduceForOfStatement', this).call(this, node, { left: left, right: right, body: body }); | ||
if (isLabelledFunction(node.body)) { | ||
s = s.addError(new _earlyErrorState.EarlyError(node.body, 'The body of a for-await statement must not be a labeled function declaration')); | ||
} | ||
s = s.clearFreeContinueStatements(); | ||
s = s.clearFreeBreakStatements(); | ||
s = s.observeLexicalBoundary(); | ||
return s; | ||
} | ||
}, { | ||
key: 'reduceFunctionBody', | ||
@@ -457,6 +476,6 @@ value: function reduceFunctionBody(node) { | ||
key: 'reduceFunctionDeclaration', | ||
value: function reduceFunctionDeclaration(node, _ref10) { | ||
var name = _ref10.name, | ||
params = _ref10.params, | ||
body = _ref10.body; | ||
value: function reduceFunctionDeclaration(node, _ref11) { | ||
var name = _ref11.name, | ||
params = _ref11.params, | ||
body = _ref11.body; | ||
@@ -506,6 +525,6 @@ var isSimpleParameterList = node.params.rest == null && node.params.items.every(function (i) { | ||
key: 'reduceFunctionExpression', | ||
value: function reduceFunctionExpression(node, _ref11) { | ||
var name = _ref11.name, | ||
params = _ref11.params, | ||
body = _ref11.body; | ||
value: function reduceFunctionExpression(node, _ref12) { | ||
var name = _ref12.name, | ||
params = _ref12.params, | ||
body = _ref12.body; | ||
@@ -556,5 +575,5 @@ var isSimpleParameterList = node.params.rest == null && node.params.items.every(function (i) { | ||
key: 'reduceGetter', | ||
value: function reduceGetter(node, _ref12) { | ||
var name = _ref12.name, | ||
body = _ref12.body; | ||
value: function reduceGetter(node, _ref13) { | ||
var name = _ref13.name, | ||
body = _ref13.body; | ||
@@ -582,6 +601,6 @@ body = body.enforceSuperCallExpressions(SUPERCALL_ERROR); | ||
key: 'reduceIfStatement', | ||
value: function reduceIfStatement(node, _ref13) { | ||
var test = _ref13.test, | ||
consequent = _ref13.consequent, | ||
alternate = _ref13.alternate; | ||
value: function reduceIfStatement(node, _ref14) { | ||
var test = _ref14.test, | ||
consequent = _ref14.consequent, | ||
alternate = _ref14.alternate; | ||
@@ -646,6 +665,6 @@ if (isLabelledFunction(node.consequent)) { | ||
key: 'reduceMethod', | ||
value: function reduceMethod(node, _ref14) { | ||
var name = _ref14.name, | ||
params = _ref14.params, | ||
body = _ref14.body; | ||
value: function reduceMethod(node, _ref15) { | ||
var name = _ref15.name, | ||
params = _ref15.params, | ||
body = _ref15.body; | ||
@@ -780,6 +799,6 @@ var isSimpleParameterList = node.params.rest == null && node.params.items.every(function (i) { | ||
key: 'reduceSetter', | ||
value: function reduceSetter(node, _ref15) { | ||
var name = _ref15.name, | ||
param = _ref15.param, | ||
body = _ref15.body; | ||
value: function reduceSetter(node, _ref16) { | ||
var name = _ref16.name, | ||
param = _ref16.param, | ||
body = _ref16.body; | ||
@@ -818,5 +837,5 @@ var isSimpleParameterList = node.param.type === 'BindingIdentifier'; | ||
key: 'reduceSwitchStatement', | ||
value: function reduceSwitchStatement(node, _ref16) { | ||
var discriminant = _ref16.discriminant, | ||
cases = _ref16.cases; | ||
value: function reduceSwitchStatement(node, _ref17) { | ||
var discriminant = _ref17.discriminant, | ||
cases = _ref17.cases; | ||
@@ -834,7 +853,7 @@ var sCases = this.append.apply(this, _toConsumableArray(cases)); | ||
key: 'reduceSwitchStatementWithDefault', | ||
value: function reduceSwitchStatementWithDefault(node, _ref17) { | ||
var discriminant = _ref17.discriminant, | ||
preDefaultCases = _ref17.preDefaultCases, | ||
defaultCase = _ref17.defaultCase, | ||
postDefaultCases = _ref17.postDefaultCases; | ||
value: function reduceSwitchStatementWithDefault(node, _ref18) { | ||
var discriminant = _ref18.discriminant, | ||
preDefaultCases = _ref18.preDefaultCases, | ||
defaultCase = _ref18.defaultCase, | ||
postDefaultCases = _ref18.postDefaultCases; | ||
@@ -841,0 +860,0 @@ var sCases = this.append.apply(this, [defaultCase].concat(_toConsumableArray(preDefaultCases), _toConsumableArray(postDefaultCases))); |
{ | ||
"name": "shift-parser", | ||
"version": "7.0.1", | ||
"version": "7.0.3", | ||
"description": "ECMAScript parser that produces a Shift format AST", | ||
@@ -31,3 +31,3 @@ "author": "Shape Security", | ||
"shift-reducer": "6.0.0", | ||
"shift-regexp-acceptor": "2.0.2" | ||
"shift-regexp-acceptor": "2.0.3" | ||
}, | ||
@@ -34,0 +34,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
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
327380
6007
+ Addedshift-regexp-acceptor@2.0.3(transitive)
- Removedshift-regexp-acceptor@2.0.2(transitive)
Updatedshift-regexp-acceptor@2.0.3