Browse Source

* Dictionaries can be empty

git-svn-id: trunk@41823 -
michael 6 years ago
parent
commit
1a5faf1cc3
1 changed files with 3 additions and 2 deletions
  1. 3 2
      packages/webidl/src/webidlparser.pp

+ 3 - 2
packages/webidl/src/webidlparser.pp

@@ -1001,12 +1001,13 @@ begin
   Result:=TIDLDictionaryDefinition(Context.Add(aParent,TIDLDictionaryDefinition,Name));
   Result.ParentName:=ParentName;
   GetToken;
-  Repeat
+  While (CurrentToken<>tkCurlyBraceClose) do
+     begin
      ParseDictionaryMember(Result.Members);
      CheckCurrentTokens([tkSemicolon,tkCurlyBraceClose]);
      if (CurrentToken=tkSemicolon) then
        GetToken;
-  Until (CurrentToken=tkCurlyBraceClose);
+     end;
 end;
 
 function TWebIDLParser.ParseSequenceTypeDef(aParent : TIDLBaseObject): TIDLSequenceTypeDefDefinition;