enumDefinitionToSpec function

Spec enumDefinitionToSpec(
  1. EnumDefinition definition
)

Generates a Spec of a single enum definition.

Implementation

Spec enumDefinitionToSpec(EnumDefinition definition) =>
    CodeExpression(Code('''enum ${definition.name.namePrintable} {
  ${definition.values.removeDuplicatedBy((i) => i).map(_enumValueToSpec).join()}
}'''));