add back in identifier

This commit is contained in:
Henry Zhu 2016-06-10 17:07:03 -04:00
parent 63e8313788
commit ff42a744df

View File

@ -4,6 +4,18 @@
import * as t from "babel-types";
export function Identifier(node: Object) {
// FIXME: We hang variance off Identifer to support Flow's def-site variance.
// This is a terrible hack, but changing type annotations to use a new,
// dedicated node would be a breaking change. This should be cleaned up in
// the next major.
if (node.variance) {
if (node.variance === "plus") {
this.push("+");
} else if (node.variance === "minus") {
this.push("-");
}
}
this.push(node.name);
}