register as inside a type when parsing type aliases to avoid ambiguous jsx parsing - fixes #1378

This commit is contained in:
Sebastian McKenzie 2015-05-11 23:44:22 +01:00
parent a402d0cdeb
commit d9deb02edc

View File

@ -153,10 +153,15 @@ pp.flow_parseTypeAlias = function (node) {
node.typeParameters = null
}
var oldInType = this.inType;
this.inType = true;
this.expect(tt.eq)
node.right = this.flow_parseType()
this.inType = oldInType;
this.semicolon()
return this.finishNode(node, "TypeAlias")