Skip to content

Use enum for ENUMERATED #40

@odiferousmint

Description

@odiferousmint

Hello.

I expected

foobar [3] IMPLICIT ENUMERATED { six(0), eight(1), ten(2) }

to generate something like:

public static enum Foobar {
  SIX,
  EIGHT,
  TEN
}

Some even go as far as (not very :P):

if (instance.getFoobar() != null) {
  writer.writeComponent("foobar");
  switch (instance.getFoobar()) {
    case SIX:
      writer.writeIdentifier("six");
      break;
    case EIGHT:
      writer.writeIdentifier("eight");
      break;
    case TEN:
      writer.writeIdentifier("ten");
      break;
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions