* 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; Result.HasEllipsis:=True;
GetToken; GetToken;
end; end;
CheckCurrentTokens([tkIdentifier,tkOther,tkCallback,tkInterface]); CheckCurrentTokens([tkIdentifier,tkOther,tkCallback,tkInterface,tkConstructor,tkAttribute]);
Result.Name:=CurrentTokenString; Result.Name:=CurrentTokenString;
ok:=true; ok:=true;
finally finally

View File

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