Packages icon indicating copy to clipboard operation
Packages copied to clipboard

[C] Falsely marking macro closing parentheses as red when using braces

Open JerwuQu opened this issue 6 years ago • 2 comments

This code seems to break the C syntax highlighter even though it can be valid.

struct my_struct* my_var = MY_MACRO({});

the code above shown in sublime


Typedeffing my_struct so that the struct keyword can be removed prevents it from breaking

my_struct* my_var = MY_MACRO({});

the code above shown in sublime


Omitting the braces also prevents it from breaking

struct my_struct* my_var = MY_MACRO();

the code above shown in sublime

JerwuQu avatar Mar 19 '19 10:03 JerwuQu

Can you try out https://github.com/sublimehq/Packages/pull/1831 and see if it fixes it.

ismell avatar Mar 19 '19 17:03 ismell

Can you try out #1831 and see if it fixes it.

Yup, seems to work.

JerwuQu avatar Mar 19 '19 20:03 JerwuQu