Codetools: Allow keyword const in generic parameter list. Issue #38087.

(cherry picked from commit 6f8172a61a)
This commit is contained in:
PeaZomboss 2022-01-18 15:26:14 +00:00 committed by Maxim Ganetsky
parent 6bc2584107
commit 1741abd120

View File

@ -4237,6 +4237,8 @@ begin
CurNode.Desc:=ctnGenericParams;
ReadNextAtom;
//debugln(['TPascalParserTool.ReadGenericParamList START ctnGenericParams ',GetAtom]);
if UpAtomIs('CONST') then // read const after <
ReadNextAtom;
if AtomIsIdentifier then begin
CreateChildNode;
CurNode.Desc:=ctnGenericParameter;
@ -4253,6 +4255,8 @@ begin
// read next name
EndChildNode;
ReadNextAtom;
if UpAtomIs('CONST') then // read const after , or ;
ReadNextAtom;
AtomIsIdentifierSaveE(20180411194201);
CreateChildNode;
CurNode.Desc:=ctnGenericParameter;