diff --git a/components/codetools/codetree.pas b/components/codetools/codetree.pas index 4499e0bd18..9eddefb6ae 100644 --- a/components/codetools/codetree.pas +++ b/components/codetools/codetree.pas @@ -83,7 +83,7 @@ const ctnVarDefinition = 21; ctnConstDefinition = 22; ctnGlobalProperty = 23; - ctnVarArgs = 24; + ctnVarArgs = 24; // macpas ... parameter ctnSrcName = 25; // children are ctnIdentifier ctnUseUnit = 26; // StartPos=unit, EndPos=unitname+inFilename, children ctnUseUnitNamespace, ctnUseUnitClearName, parent ctnUsesSection ctnUseUnitNamespace = 27; // .clearname.pas, parent ctnUseUnit diff --git a/components/codetools/pascalparsertool.pas b/components/codetools/pascalparsertool.pas index f0cd7000ef..756bfe980e 100644 --- a/components/codetools/pascalparsertool.pas +++ b/components/codetools/pascalparsertool.pas @@ -1993,6 +1993,15 @@ begin AtomIsIdentifierSaveE(20180411194104); ReadNextAtom; end; + end else if UpAtomIs('VARARGS') then begin + ReadNextAtom; + if UpAtomIs('OF') then begin + CreateChildNode; + CurNode.Desc:=ctnVarArgs; + ReadNextAtom; + ReadTypeReference(true); + EndChildNode; + end; end else begin // read specifier without parameters if UpAtomIs('FORWARD') then HasForwardModifier:=true;