Sublime Forum

ST3047: Broken C syntax highlight (macros, array references)

#1

[size=150]Example 1:[/size]
The following partially breaks highlighting from the ampersand all the way to the end of the line.

void foo(const float (&arrayReference)], const UserStruct &data, bool flag, int value);

I say partially because the ‘const’ keyword is still highlighted, but the basic types, e.g. ‘bool’, ‘int’ are not. Screenshot at imgur.com/DpmHKPs .

I understand it’s not a great use-case because the code works just as well without the reference, but please see the next example.

[size=150]Example 2:[/size]

MACRO( UserClass, Get()->Foo( GetOther(0).GetOtherOther(), bool ThisIsntHighlighted, int ThisNeither, const UserStruct NorThisExceptForConst));
Same as Example 1 here. However, after 15 macro instantiations (16th onwards), everything stops being highlighted. Screenshot is at imgur.com/xmO5RDX .

I can also file on GitHub if required, so please let me know. Thanks!

0 Likes