function formatType(type) {
        var result;
        if (type.generic) {
            result = type.generic + "<" + type.idlType.map(formatType).join(", ") + ">";
        } else if (type.union) {
            result = "(" + type.subtype.map(formatType).join(" or ") + ")";
        } else {
            result = type.idlType;
        }
        if (type.nullable) {
            result += "?"
        }
        return result;
    }
obj is an object produced by the WebIDLParser.js "ifMember" production.
We just forward all properties to this object without modification,
except for special extAttrs handling.