Skip to content

Commit

Permalink
Allow UMETA decorators for enumerations (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
arturjpv authored Feb 11, 2025
1 parent ec8c76a commit 5d0a06b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions UnrealAngelscriptParser/Grammar/UnrealAngelscriptLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ UFunction: 'UFUNCTION';
UEnum: 'UENUM';
UMeta: 'UMETA';
Import: 'import';
From: 'from';
Expand Down
5 changes: 4 additions & 1 deletion UnrealAngelscriptParser/Grammar/UnrealAngelscriptParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ annotation:
uenum:
UEnum LeftParen annotationList? RightParen;

umeta:
UMeta LeftParen annotationList? RightParen;

utype:
(UClass | UStruct) LeftParen annotationList? RightParen;

Expand Down Expand Up @@ -382,7 +385,7 @@ enumbase: Colon typeSpecifierSeq;
enumeratorList:
enumeratorDefinition (Comma enumeratorDefinition)*;

enumeratorDefinition: enumerator (Assign constantExpression)?;
enumeratorDefinition: enumerator (Assign constantExpression)? umeta?;

enumerator: Identifier;

Expand Down

0 comments on commit 5d0a06b

Please sign in to comment.