Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

C source code highlighting not functioning after macro definition containing > and parentheses #75

Closed
Sleepwalking opened this issue Jun 7, 2015 · 1 comment · Fixed by #206
Labels

Comments

@Sleepwalking
Copy link

(moved from atom/atom #7151)

Atom (and also github's markdown) only highlights the first line but not the second line for the following C code:

#define a >b()
int c;
int d;

And after the second line everything is fine again.

Here's a more realistic senario:

#define fmax(f, a, b) (f(a) > f(b) ? f(a) : f(b))
int c;
int d;

This bug only happens when there is one or more letter between > and (, including spaces but excluding tokens begining with numbers. For example these are going to trigger the bug:

#define a > a b c d ()
int e;
int f;
#define a > a b12 c34 d56 ()
int e;
int f;

This is not going to trigger the bug:

#define a > a b c 1d ()
int e;
int f;

Square brackets instead of parentheses would not trigger the bug:

#define a > a b c d []
int e;
int f;
#define a > a b12 c34 d56 []
int e;
int f;

issue

Version of Atom editor: 0.204.0 on both Ubuntu 14 and Windows 7
This bug occurs even if all packages except core packages are disabled.

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

Successfully merging a pull request may close this issue.

2 participants