[Lazarus] Can the Lazarus IDE match parentheses and begin/ends?

Martin Frb lazarus at mfriebe.de
Sun Jan 7 22:45:09 CET 2018


On 07/01/18 22:31, Bo Berglund via Lazarus wrote:
> In another code line if I do the same and put the cursorat the end );
> between the last chars, then the highlight comes on and boxes the last
> ) paired with a ( on 7 lines above when there are a lot of both ( and
> ) inbetween....
> Clearly an erroneous highlight.

Please check this kind of errors, with 1.8.2 (once released) or the bug 
fix patch applied.
If an incorrect bracket is highlighted with the fix, then please report it.

Note that, brackets in strings or comments, will/should not be matched 
with brackets in code.

    if (a = '(' ) then // (
         a := ')';  // )

should match
- the 2 brackets in code
- AND the 2 brackets inside the 2 strings
- AND the 2 brackets inside the 2 comments

It should also match the correct quotes '.

Bracket matching only ever looks at one kind of brackets.
When matching (), it will totally ignore any [].
So erroneous code like
   if (a[1]] = 2) then
will match the ().
As well as the [] directly around the 1.
And the extra ] will not match anything.



More information about the Lazarus mailing list