- return new EnumSpecificationImpl(ctx.coerceRawStatementArgument(), substatements);
- }
-
- @Override
- protected EnumSpecification createEmptyDeclared(final StmtContext<String, EnumSpecification, ?> ctx) {
- throw noEnum(ctx.getStatementSourceReference());
+ if (substatements.isEmpty()) {
+ throw noEnum(ctx);
+ }
+ return new EnumSpecificationImpl(ctx.getRawArgument(), ctx.getArgument(), substatements);