mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-25 13:49:16 +02:00
codetools: fixed setting EndPos of ctnGenericParam, bug #30489
git-svn-id: trunk@52844 -
This commit is contained in:
parent
22a65dfeb7
commit
2b61a95171
@ -4048,6 +4048,7 @@ begin
|
||||
if AtomIsIdentifier then begin
|
||||
CreateChildNode;
|
||||
CurNode.Desc:=ctnGenericParameter;
|
||||
CurNode.EndPos:=CurPos.EndPos;
|
||||
ReadNextAtom;
|
||||
repeat
|
||||
// read name
|
||||
@ -4063,6 +4064,7 @@ begin
|
||||
AtomIsIdentifierSaveE;
|
||||
CreateChildNode;
|
||||
CurNode.Desc:=ctnGenericParameter;
|
||||
CurNode.EndPos:=CurPos.EndPos;
|
||||
ReadNextAtom;
|
||||
end else if AtomIsChar('>') then begin
|
||||
break;
|
||||
@ -4075,6 +4077,7 @@ begin
|
||||
end;
|
||||
repeat
|
||||
CurNode.EndPos:=CurPos.EndPos;
|
||||
CurNode.Parent.EndPos:=CurPos.EndPos;
|
||||
if UpAtomIs('RECORD') or UpAtomIs('CLASS') or UpAtomIs('CONSTRUCTOR')
|
||||
then begin
|
||||
// keyword
|
||||
@ -4095,7 +4098,6 @@ begin
|
||||
ReadNextAtom;
|
||||
until false;
|
||||
// close ctnGenericConstraint
|
||||
CurNode.EndPos:=LastAtoms.GetValueAt(0).EndPos;
|
||||
EndChildNode;
|
||||
if AtomIsChar('>') then break;
|
||||
// cursor is now on ;
|
||||
@ -4103,7 +4105,6 @@ begin
|
||||
SaveRaiseCharExpectedButAtomFound('>');
|
||||
until false;
|
||||
// close ctnGenericParameter
|
||||
CurNode.EndPos:=LastAtoms.GetValueAt(0).EndPos;
|
||||
EndChildNode;
|
||||
end else begin
|
||||
if AtomIs('>=') then
|
||||
|
Loading…
Reference in New Issue
Block a user