Skip to content

Commit

Permalink
[-] fix parsing of custom attribute vs interface guid
Browse files Browse the repository at this point in the history
  • Loading branch information
casteng committed Feb 17, 2020
1 parent b962498 commit 68954bf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugin/src/lang/parser/pascal.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ private classParentWORec ::= ClassParent
ClassParent ::= "(" TypeID? classParentRest ")" {pin = 1}
private classParentRest ::= ("," TypeID)* //{pin=1 recoverWhile=rec_classparent_rest}

private interfaceGuid ::= "[" quotedString "]" {pin=1}
private interfaceGuid ::= "[" quotedString "]"
private interfaceKey ::= INTERFACE | DISPINTERFACE | (OBJC_PROTOCOL [EXTERNAL [externalSpecifier]])

ClassTypeTypeDecl ::= CLASS OF TypeID {pin(".*")="class of" name="metaclass declaration"}
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/lang/parser/syn.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ private classParentWORec ::= ClassParent
ClassParent ::= "(" TypeID? classParentRest ")" {pin = 1}
private classParentRest ::= ("," TypeID)* //{pin=1 recoverWhile=rec_classparent_rest}

private interfaceGuid ::= "[" quotedString "]" {pin=1}
private interfaceGuid ::= "[" quotedString "]"
private interfaceKey ::= INTERFACE | DISPINTERFACE | (OBJC_PROTOCOL [EXTERNAL [externalSpecifier]])

ClassTypeTypeDecl ::= CLASS OF TypeID {pin(".*")="class of" name="metaclass declaration"}
Expand Down
8 changes: 8 additions & 0 deletions testData/annotator/interfaces.pas
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ interface
procedure proc; virtual;
end;

IEnum<T> = interface
[CustomAttribute('virtual T __fastcall GetCurrentT(void) = 0')]
function GetCurrent: T;
[CustomAttribute2('__property T Current = {read=GetCurrentT}')]
property Current: T read GetCurrent;
end;


[CustomAttribute, CustomAttribute2('', '', False)]
TA = class
private
Expand Down

0 comments on commit 68954bf

Please sign in to comment.