* Allow more keywords as argument identifiers

This commit is contained in:
Michaël Van Canneyt 2024-04-04 20:39:33 +02:00
parent 02c4ac974a
commit d12d82dab4
2 changed files with 8 additions and 1 deletions

View File

@ -489,7 +489,7 @@ begin
Result.HasEllipsis:=True;
GetToken;
end;
CheckCurrentTokens([tkIdentifier,tkOther,tkCallback,tkInterface]);
CheckCurrentTokens([tkIdentifier,tkOther,tkCallback,tkInterface,tkConstructor,tkAttribute]);
Result.Name:=CurrentTokenString;
ok:=true;
finally

View File

@ -244,6 +244,7 @@ Type
Procedure TestOptionalDefaultArgFunction;
Procedure TestFunction_ClampArg;
Procedure TestFunction_ArgNameCallback;
procedure TestFunction_ArgNameConstructor;
end;
{ TTestDictionaryParser }
@ -524,6 +525,12 @@ begin
ParseFunction('void getAsString(FunctionStringCallback? callback)','getAsString','void',['FunctionStringCallback','callback']);
end;
procedure TTestOperationInterfaceParser.TestFunction_ArgNameConstructor;
begin
ParseFunction('void getAsString(FunctionStringCallback? constructor)','getAsString','void',['FunctionStringCallback','constructor']);
end;
{ TTestSerializerInterfaceParser }
function TTestSerializerInterfaceParser.ParseSerializer(ADef: UTF8String; Attrs: array of UTF8String): TIDLSerializerDefinition;