Fix parsing of class properties (#351)
This commit is contained in:
committed by
Daniel Tschinder
parent
0b7da509d9
commit
81056eeee7
@@ -1109,6 +1109,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 () {
|
||||
@@ -1439,14 +1446,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);
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user