* Flow enums parsing * Parse exporting enums * Enums parsing remove lookahead, other improvements * Enums: add EnumBody and EnumMember aliases, change boolean members to use BooleaLiteral value * Fix enum member init flow type, now that boolean members have a BooleanLiteral value * Flow enums: use contextual utils, change members length checks to use logic operators, remove reserved word logic modification * Flow enums: remove unnecessary code in generator, fix error message
37 lines
310 B
JavaScript
37 lines
310 B
JavaScript
enum E {
|
|
A = true,
|
|
B = false,
|
|
}
|
|
enum E of boolean {
|
|
A = true,
|
|
B = false,
|
|
}
|
|
enum E {
|
|
A = 1,
|
|
B = 2,
|
|
}
|
|
enum E of number {
|
|
A = 1,
|
|
B = 2,
|
|
}
|
|
enum E {
|
|
A,
|
|
B,
|
|
}
|
|
enum E of string {
|
|
A,
|
|
B,
|
|
}
|
|
enum E {
|
|
A = "a",
|
|
B = "b",
|
|
}
|
|
enum E of string {
|
|
A = "a",
|
|
B = "b",
|
|
}
|
|
enum E of symbol {
|
|
A,
|
|
B,
|
|
}
|