[Lazarus] Language additions breaking IDE

Anthony Walter sysrpl at gmail.com
Fri Aug 26 22:42:28 CEST 2011


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:

http://bugs.freepascal.org/view.php?id=20059

            // begin fix unit codetools/pascalparser
            // method: TPascalParserTool.ReadTilProcedureHeadEnd
            // insert at line number 1535
            // line above should be "end;"
            // Level: Integer is new local variable
            Level := 1;
            if GetAtom = '<' then
            begin
                ReadNextAtom;
                while True do
                begin
                    AtomIsIdentifier(true);
                    ReadNextAtom;
                    if CurPos.Flag = cafPoint then
                        Continue;
                    if CurPos.Flag = cafComma then
                    begin
                        ReadNextAtom;
                        Continue;
                    end;
                    if GetAtom = '<' then
                    begin
                        Inc(Level);
                        Continue;
                    end;
                    while GetAtom = '>' do
                    begin
                        ReadNextAtom;
                        Dec(Level);
                        if Level = 0 then
                            Break;
                        Continue;
                    end;
                    Break;
                end;
            end;
            // end fix
            // line below should be "end else begin"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110826/f0f6a28f/attachment-0003.html>


More information about the Lazarus mailing list