Fantom

 

class compiler::InitEnum

sys::Obj
  compiler::CompilerSupport
    compiler::CompilerStep
      compiler::InitEnum

Source

InitEnum is used to auto-generate EnumDefs into abstract syntax tree representation of the fields and method.

addCtor

Void addCtor()

Source

Add constructor or enhance existing constructor.

addFromStr

Void addFromStr()

Source

Add fromStr method.

make

new make(Compiler compiler)

Source

makeField

FieldDef makeField(EnumDef def)

Source

Make enum value field: public static final Foo name = make(ord, name)

makeValsField

FieldDef makeValsField()

Source

Make vals field: List of Enum values

run

virtual override Void run()

Source

visitTypeDef

virtual override Void visitTypeDef(TypeDef t)

Source