Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was 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

@Sleepwalking

Description

@Sleepwalking

(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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions