<div>Okay I created a possible fix for this problem, though I'm not entirely sure if it's correct. This is my first contribution to any open source projects, so please take review changes with a bit of trepidation. You make want to also link to the issue with this code:</div>
<div><br></div><div><a href="http://bugs.freepascal.org/view.php?id=20059">http://bugs.freepascal.org/view.php?id=20059</a></div><div><br></div><div> // begin fix unit codetools/pascalparser</div><div> // method: TPascalParserTool.ReadTilProcedureHeadEnd</div>
<div> // insert at line number 1535</div><div> // line above should be "end;"</div><div> // Level: Integer is new local variable</div><div> Level := 1;</div><div> if GetAtom = '<' then</div>
<div> begin</div><div> ReadNextAtom;</div><div> while True do</div><div> begin</div><div> AtomIsIdentifier(true);</div><div> ReadNextAtom;</div>
<div> if CurPos.Flag = cafPoint then</div><div> Continue;</div><div> if CurPos.Flag = cafComma then</div><div> begin</div><div> ReadNextAtom;</div>
<div> Continue;</div><div> end;</div><div> if GetAtom = '<' then</div><div> begin</div><div> Inc(Level);</div>
<div> Continue;</div><div> end;</div><div> while GetAtom = '>' do</div><div> begin</div><div> ReadNextAtom;</div>
<div> Dec(Level);</div><div> if Level = 0 then</div><div> Break;</div><div> Continue;</div><div> end;</div>
<div> Break;</div><div> end;</div><div> end;</div><div> // end fix</div><div> // line below should be "end else begin"</div>