gen: remove enum value typedefs :D

pull/4072/head
Joe Conigliaro 2020-03-19 21:21:08 +11:00
parent 408553e967
commit e457bedaa7
1 changed files with 0 additions and 7 deletions

View File

@ -689,13 +689,6 @@ fn (g mut Gen) expr(node ast.Expr) {
ast.EnumVal { ast.EnumVal {
// g.write('/*EnumVal*/${it.mod}${it.enum_name}_$it.val') // g.write('/*EnumVal*/${it.mod}${it.enum_name}_$it.val')
styp := g.typ(it.typ) styp := g.typ(it.typ)
if table.type_is_optional(it.typ) {
ostyp := styp + '_$it.val'
if !(ostyp in g.optionals) {
g.definitions.writeln('typedef Option $ostyp;')
g.optionals << ostyp
}
}
g.write(styp) g.write(styp)
g.write('_$it.val') g.write('_$it.val')
} }