fix various bugs surfaced by the esprima test suite, remove some incorrect tests

This commit is contained in:
Sebastian McKenzie
2015-08-11 16:58:20 +01:00
parent 1a4f18aab7
commit a179f9a48b
45 changed files with 704 additions and 703 deletions

View File

@@ -609,7 +609,7 @@ export default function (instance) {
instance.extend("parseStatement", function (inner) {
return function (declaration, topLevel) {
// strict mode handling of `interface` since it's a reserved word
if (this.strict && this.match(tt.name) && this.state.value === "interface") {
if (this.state.strict && this.match(tt.name) && this.state.value === "interface") {
var node = this.startNode();
this.next();
return this.flowParseInterface(node);