logo

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

addCtor

Void addCtor()

Add constructor or enhance existing constructor.

Source

addFromStr

Void addFromStr()

Add fromStr method.

Source

make

new make(Compiler compiler)

Source

makeField

FieldDef makeField(EnumDef def)

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

Source

makeValuesField

FieldDef makeValuesField()

Make values field: List of Enum values

Source

run

override Void run()

Run the step

Source

visitTypeDef

override Void visitTypeDef(TypeDef t)

Callback when visiting a type definition.

Source