Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1579 Braces as comment delimiters (User-defined)

open
nobody
5
2012-11-13
2008-08-06
jarvis
No

References bug 1907863 (so far unassigned).

I am using a Pascal variant language (LIL) so I have set up custom syntax highlighting for it. It uses { and } to denote multi-line comments and these can't ever be nested. There is no symbol for a single line comment.

Here is the problem:
If a comment is a single word with no white space and containing no characters defined as operators, the comment colour (green colour) leaks out and colours the code after the comment.

E.g. This works fine (because of the : operator):
{TEST:}
Exit;

This also works (because of the space):
{TEST }
Exit;

This causes a problem, in that the Exit; text will be highlighted as a
comment.
{TEST}
Exit;

I have my userDefineLang.xml file attached if it
helps.

Discussion

  • jarvis
    jarvis
    2008-08-06

    Userdefinelang.xml file containing custom syntax named "LIL"

     
    Attachments

  • Anonymous
    2010-09-23

    Try the "treat keywords as symbols" checkbox. It should allow comment delimiters to be recognized even if there is no surrounding whitespace/no surrounding operator.