The syntax highlighter of the IDE now supports nested comments for
FreePascal sources.

Contrary to Delphi the FreePascal compiler handles nested comments, for
example {{}} or (*(* *)*). If they are enabled depends on the mode. Because
Lazarus uses as default mode objfpc: nested comments are enabled.

Under Delphi you were able to write this:

{ a curly bracket { starts a comment } statement;

Compiled with objfpc mode this comments the whole code after the } as well,
leading to strange errors (unexpected end of file), because the IDE syntax
highlighter didn't support nested comments. Now it does.

Drawback:
The highlighter does not parse the {$mode delphi} directive, nor does it
know the compiler options. Default is to treat all pascal sources as
FreePascal sources.

Solution:
If you use comments like the above you can change the highlighter, by right
clicking in the source editor to open the popup menu, then go to
'highlighter' and select 'Delphi'. This changes the highlighter of the
current file. This information is stored in the project session information.


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to