Menu

#1054 Ability to change inline comment char for language lexers

Won't_Implement
closed
2
2014-08-14
2014-06-20
Metallicow
No

It would be a useful addition to be able to change the comment char or startswith string chars for inline comments for the various lexers. By allowing this, creation of other custom lexers for slightly different or less known languages with minor changes compared to a certain lexer.

Ex: A method such as...
GetLexerInlineCommentChars(stc.STC_P_COMMENTLINE)
would return "#"
and to change it to support a slightly different language would be like...
SetLexerInlineCommentChars(stc.STC_P_COMMENTLINE, ";")
so that ";" instead of "#" would color the commentlines, similar to mixing the PROPERTIES lexer with the PYTHON lexer.

Would something such as this be easy enough to implement without too much hassle?

Discussion

  • Neil Hodgson

    Neil Hodgson - 2014-06-20

    A problem with allowing syntax to be more variable is that makes it more difficult to implement some other features. There was a performance improvement I would have liked to implement which was made too difficult by the C++ lexer allowing arbitrary strings to be treated as fold points.

    If you have a particular need for a language with a different comment character then implement that particular language.

     
  • Neil Hodgson

    Neil Hodgson - 2014-06-20
    • labels: --> scintilla, lexer
    • assigned_to: Neil Hodgson
    • Group: Completed --> Won't_Implement
    • Priority: 5 --> 2
     
  • Neil Hodgson

    Neil Hodgson - 2014-08-14
    • status: open --> closed
     

Log in to post a comment.