Skip to content

Commit

Permalink
Support parenthesized backing types in enum type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwan87 committed Jan 3, 2025
1 parent d25dc5f commit 0515baf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/core/src/main/java/com/lasagnerd/odin/lang/Odin.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ private fieldDeclarator ::= declaredIdentifier (COMMA declaredIdent
private fieldRecover ::= !(EOS_TOKEN | COMMA | RBRACE | RAW_STRING_LITERAL)

// Enum
enumType ::= ENUM [qualifiedType|simpleRefType] EOS_TOKEN? enumBlock {pin=1}
enumType ::= ENUM [enumBackingType| LPAREN enumBackingType RPAREN] EOS_TOKEN? enumBlock {pin=1}
private enumBackingType ::= qualifiedType|simpleRefType
enumBlock ::= blockStart [enumBody] blockEnd
enumBody ::= enumValueDeclaration (COMMA enumValueDeclaration)* [EOS_TOKEN|COMMA] {implements="com.lasagnerd.odin.lang.psi.OdinScopeBlock"}
enumValueDeclaration ::= declaredIdentifier [EQ expression]
Expand Down

0 comments on commit 0515baf

Please sign in to comment.