Merge branch 'master' into 7.0

* master:
  Upgrade flow to 0.41
  Throw error if new.target is used outside of a function (#402)
  Fix watch command (#403)
  Update yarn lock
  Fix parsing of class properties (#351)

# Conflicts:
#	src/parser/statement.js
#	test/fixtures/experimental/class-constructor-call/illegal-key/options.json
This commit is contained in:
Daniel Tschinder
2017-03-10 13:47:45 +01:00
42 changed files with 3794 additions and 81 deletions

View File

@@ -1112,6 +1112,13 @@ export default function (instance) {
};
});
// determine whether or not we're currently in the position where a class method would appear
instance.extend("isClassMethod", function (inner) {
return function () {
return this.isRelational("<") || inner.call(this);
};
});
// determine whether or not we're currently in the position where a class property would appear
instance.extend("isClassProperty", function (inner) {
return function () {
@@ -1437,14 +1444,4 @@ export default function (instance) {
return this.match(tt.colon) || inner.call(this);
};
});
instance.extend("isClassMutatorStarter", function (inner) {
return function () {
if (this.isRelational("<")) {
return true;
} else {
return inner.call(this);
}
};
});
}