Skip to content

Commit

Permalink
enforcing trailing comma on haxe 3 anonymous structure extensions syn…
Browse files Browse the repository at this point in the history
…tax (#1168)
  • Loading branch information
m0rkeulv committed May 6, 2024
1 parent ca52e67 commit 41dc3a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ anonymousTypeBody ::= anonymousTypeWithEmptyBody | regularAnonymousTypeBody
private anonymousTypeWithEmptyBody ::= '{' '}' {pin=2}
private regularAnonymousTypeBody ::= '{' anonymousTypeBodyContents '}' {pin=2}
private anonymousTypeBodyContents ::= extendedAnonymousTypeBody | simpleAnonymousTypeBody | anonymousInterfaceBodyList
private extendedAnonymousTypeBody ::= typeExtendsList (',' anonymousTypeFieldList)? (sep anonymousInterfaceBodyList)?
private extendedAnonymousTypeBody ::= typeExtendsList ',' (anonymousTypeFieldList)? (anonymousInterfaceBodyList)?
private anonymousInterfaceBodyList ::= (optionalFieldDeclaration | interfaceBodyPart )+ {recoverWhile="interface_body_part_recover"}
private simpleAnonymousTypeBody ::= anonymousTypeFieldList (sep anonymousInterfaceBodyList)?
typeExtendsList ::= '>' type (',' '>' type)* {pin=1}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ typedef TExtendSelf = {
}

typedef TBar = {
>test.TBar
>test.TBar,
}

class BarBase {}
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/testData/goto/TypeDef6.hx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
typedef TypeDef6 = {
> Typedef<caret>Extension1,
> Typedef<caret>Extension2,
> Typedef<caret>Extension3
> Typedef<caret>Extension3,
}

typedef TypedefExtension1 = {}
Expand Down

0 comments on commit 41dc3a9

Please sign in to comment.