diff --git a/components/codetools/pascalparsertool.pas b/components/codetools/pascalparsertool.pas index 8efcf029bc..3e898d1019 100644 --- a/components/codetools/pascalparsertool.pas +++ b/components/codetools/pascalparsertool.pas @@ -4659,6 +4659,7 @@ begin if (not UpAtomIs('PROCEDURE')) and (not UpAtomIs('FUNCTION')) then SaveRaiseStringExpectedButAtomFound('"procedure"'); Result:=KeyWordFuncTypeProc; + CurNode.EndPos:=CurPos.StartPos; EndChildNode; end else begin Result:=KeyWordFuncTypeDefault;