Comparing version 6.8.2 to 6.8.3
@@ -16,2 +16,26 @@ # Changelog | ||
## 6.8.1 (2016-06-06) | ||
### New Feature | ||
- Parse type parameter declarations with defaults like `type Foo<T = string> = T` | ||
### Bug Fixes | ||
- Type parameter declarations need 1 or more type parameters. | ||
- The existential type `*` is not a valid type parameter. | ||
- The existential type `*` is a primary type | ||
### Spec Compliancy | ||
- The param list for type parameter declarations now consists of `TypeParameter` nodes | ||
- New `TypeParameter` AST Node (replaces using the `Identifier` node before) | ||
``` | ||
interface TypeParameter <: Node { | ||
bound: TypeAnnotation; | ||
default: TypeAnnotation; | ||
name: string; | ||
variance: "plus" | "minus"; | ||
} | ||
``` | ||
## 6.8.0 (2016-05-02) | ||
@@ -18,0 +42,0 @@ |
@@ -65,14 +65,20 @@ "use strict"; | ||
return function (expr, noIn, startPos, startLoc, refNeedsArrowPos) { | ||
var state = this.state.clone(); | ||
try { | ||
return inner.call(this, expr, noIn, startPos, startLoc); | ||
} catch (err) { | ||
if (refNeedsArrowPos && err instanceof SyntaxError) { | ||
this.state = state; | ||
refNeedsArrowPos.start = this.state.start; | ||
return expr; | ||
} else { | ||
throw err; | ||
// only do the expensive clone if there is a question mark | ||
// and if we come from inside parens | ||
if (refNeedsArrowPos && this.match(_types.types.question)) { | ||
var state = this.state.clone(); | ||
try { | ||
return inner.call(this, expr, noIn, startPos, startLoc); | ||
} catch (err) { | ||
if (err instanceof SyntaxError) { | ||
this.state = state; | ||
refNeedsArrowPos.start = err.pos || this.state.start; | ||
return expr; | ||
} else { | ||
throw err; | ||
} | ||
} | ||
} | ||
return inner.call(this, expr, noIn, startPos, startLoc); | ||
}; | ||
@@ -79,0 +85,0 @@ }); |
{ | ||
"name": "babylon", | ||
"version": "6.8.2", | ||
"version": "6.8.3", | ||
"description": "A JavaScript parser", | ||
@@ -13,2 +13,6 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>", | ||
}, | ||
"files": [ | ||
"bin", | ||
"lib" | ||
], | ||
"devDependencies": { | ||
@@ -15,0 +19,0 @@ "ava": "^0.15.2", |
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
5510
214430
26