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.

Tree-sitter parsing breaks function-like macro syntax highlighting in C #314

Open
@openformatproj

Description

@openformatproj

Description

From atom/atom/Tree-sitter parsing breaks function-like macro syntax highlighting in C #18346

Steps to Reproduce

  1. define a global function macro, as
#define IFERR(RET) \
if (RET<0) {

#define CONTINUE \
  continue; \
}
  1. instantiate it
IFERR(bytes_red)
 errsys("Ricezione nuova richiesta");
CONTINUE;

Expected behavior: macro names in blue, arguments in white

Actual behavior: macro names in orange, arguments in blue, further troubles between two macros
atom syntax

Edit by @rsese to add screenshots

With Tree-sitter:

tree-sitter

Tree-sitter disabled:

tree-sitter-disabled

Reproduces how often: 100%

Versions

Atom Version: 1.33.1
OS: Ubuntu 18.04, Windows 10

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions