Add support for mixins to Babel 6.x
This commit is contained in:
@@ -109,6 +109,7 @@ pp.flowParseInterfaceish = function (node, allowStatic) {
|
||||
}
|
||||
|
||||
node.extends = [];
|
||||
node.mixins = [];
|
||||
|
||||
if (this.eat(tt._extends)) {
|
||||
do {
|
||||
@@ -116,6 +117,13 @@ pp.flowParseInterfaceish = function (node, allowStatic) {
|
||||
} while (this.eat(tt.comma));
|
||||
}
|
||||
|
||||
if (this.isContextual("mixins")) {
|
||||
this.next();
|
||||
do {
|
||||
node.mixins.push(this.flowParseInterfaceExtends());
|
||||
} while (this.eat(tt.comma));
|
||||
}
|
||||
|
||||
node.body = this.flowParseObjectType(allowStatic);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user