Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aroben opened this issue Nov 21, 2014 · 0 comments
Open

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

aroben opened this issue Nov 21, 2014 · 0 comments

Comments

@aroben
Copy link

aroben commented Nov 21, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant