Fan

 

class

compiler::InitEnum

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

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

Slots

addCtorSource

Void addCtor()

Add constructor or enhance existing constructor.

addFromStrSource

Void addFromStr()

Add fromStr method.

makeSource

new make(Compiler compiler)

makeFieldSource

FieldDef makeField(EnumDef def)

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

makeValuesFieldSource

FieldDef makeValuesField()

Make values field: List of Enum values

runSource

override Void run()

Overrides compiler::CompilerStep.run

Doc inherited from compiler::CompilerStep.run

Run the step

visitTypeDefSource

override Void visitTypeDef(TypeDef t)

Overrides compiler::Visitor.visitTypeDef

Doc inherited from compiler::Visitor.visitTypeDef

Callback when visiting a type definition.