acorn
Advanced tools
Comparing version 4.0.7 to 4.0.8
@@ -0,1 +1,9 @@ | ||
## 4.0.8 (2017-02-03) | ||
### Bug fixes | ||
Solve spurious parenthesized pattern errors by temporarily erring on | ||
the side of accepting programs that our delayed errors don't handle | ||
correctly yet. | ||
## 4.0.7 (2017-02-02) | ||
@@ -2,0 +10,0 @@ |
@@ -7,3 +7,3 @@ { | ||
"jsnext:main": "dist/acorn.es.js", | ||
"version": "4.0.7", | ||
"version": "4.0.8", | ||
"engines": { | ||
@@ -10,0 +10,0 @@ "node": ">=0.4.0" |
@@ -107,3 +107,10 @@ // A recursive descent parser operates by defining functions for all | ||
if (this.type.isAssign) { | ||
if (left.type != "MemberExpression") this.checkPatternErrors(refDestructuringErrors) | ||
if (left.type != "MemberExpression") { | ||
// FIXME this isn't correct, but is a workaround for the problem | ||
// of refDestructuringErrors being shared between the potential | ||
// arrow function arglist and an assignment inside that list. | ||
// See #502 | ||
if (refDestructuringErrors.parenthesized < startPos) refDestructuringErrors.parenthesized = -1 | ||
this.checkPatternErrors(refDestructuringErrors) | ||
} | ||
if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors) | ||
@@ -110,0 +117,0 @@ let node = this.startNodeAt(startPos, startLoc) |
@@ -39,3 +39,3 @@ // Acorn is a tiny, fast JavaScript parser written in JavaScript. | ||
export const version = "4.0.7" | ||
export const version = "4.0.8" | ||
@@ -42,0 +42,0 @@ // The main exported interface (under `self.acorn` when in the |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
576488
13644