Skip to content
This repository has been 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 opened this issue Dec 28, 2018 · 1 comment

Comments

@openformatproj
Copy link

openformatproj commented Dec 28, 2018

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

@rsese
Copy link

rsese commented Dec 28, 2018

Thanks @openformatproj - reproduced on macOS 10.12.6 with 1.33.1. With Tree-sitter:

tree-sitter

Tree-sitter disabled:

tree-sitter-disabled

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

No branches or pull requests

2 participants