Sublime Forum

Syntax highlighting error prone

#1

Hey,
I’m not sure where bugs go? Sorry if this is the wrong area.

I’ve noticed when working with C/C++ macro defines, the syntax highlighting is inaccurate and inconsistent.

Couple of cases to demonstrate my point:

  1. Macros defines in the form of a function
    If there is only one parameter it correctly highlights it.
    If there are multiple parameters, the highlighting disappears with the ,

  2. Macro symbol expansions
    Sometimes the symbals (parameters to the macro) are correctly highlighted in the macro body. Sometimes not.
    Symbol concatenation (eg. foo##mysymbol for example) seems to break syntax highlighting for the whole macro body.

I work with C/C++ macros a lot. And I’d love for the syntax highlighter to work correctly because working with macros is hard enough without it appearing as one big white blob of text.

Thanks!

0 Likes

#2

I’d also like to further add that syntax highlighting has problems with some of the newer syntax in C++11.

0 Likes

#3

Just wanted to chime in here, proper macro highlighting in c/c++ would be terrific.
It’s not bad, but sometimes it’ll highlight the first recognized macro/function and skip the rest

0 Likes