webidl: allow func arg name callback

This commit is contained in:
mattias 2022-06-15 09:20:58 +02:00
parent a0f572892e
commit cc3589d459
2 changed files with 7 additions and 1 deletions

View File

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

View File

@ -232,6 +232,7 @@ Type
Procedure TestAttrFunctionFunction;
Procedure TestOptionalDefaultArgFunction;
Procedure TestFunction_ClampArg;
Procedure TestFunction_ArgNameCallback;
end;
{ TTestDictionaryParser }
@ -507,6 +508,11 @@ begin
AssertEquals('optional arg is Clamp',true,Arg.HasSimpleAttribute('Clamp'));
end;
procedure TTestOperationInterfaceParser.TestFunction_ArgNameCallback;
begin
ParseFunction('void getAsString(FunctionStringCallback? callback)','getAsString','void',['FunctionStringCallback','callback']);
end;
{ TTestSerializerInterfaceParser }
function TTestSerializerInterfaceParser.ParseSerializer(ADef: UTF8String; Attrs: array of UTF8String): TIDLSerializerDefinition;