Skip to content

Use enum for ENUMERATED #40

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;
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions