c.tmbundle icon indicating copy to clipboard operation
c.tmbundle copied to clipboard

Macro used as part of C multi-line string literal breaks parsing

Open aroben opened this issue 11 years ago • 0 comments

There are a few bugs in the parsing of this bit of C code:

1. The first use of the `SAMPLE` macro on line 66 gets tagged as `meta.function.c`, i.e., a function declaration, rather than a function (well, macro) call. 2. This then causes everything up to the first semicolon on line 74 to be included in the `meta.function.c` scope. 3. That in turn means that the closing quote near the end of line 74 is interpreted as an opening quote, which means that all the code after that is considered to be inside a `string.quoted.double.c`.

You can also see this bug on github.com, which uses this bundle for highlighting C code, here: https://github.com/GNOME/clutter/blob/ddda4aec18359aa6bcdff218133c079d4733f155/clutter/clutter-blur-effect.c#L74. This bug was reported to us by one of our users.

aroben avatar Nov 21 '14 19:11 aroben