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

Macro value of #define not highlighted separately to name #305

Open
1 task
cjastone opened this issue Nov 7, 2018 · 1 comment
Open
1 task

Macro value of #define not highlighted separately to name #305

cjastone opened this issue Nov 7, 2018 · 1 comment

Comments

@cjastone
Copy link

cjastone commented Nov 7, 2018

Prerequisites

Description

I recently raised the following issue: #299

This seems to be related to the above, which was fixed very quickly - good work by all!

The value immediately following the macro name is not highlighted and remains the same colour as the macro name,.

Steps to Reproduce

  1. Create a line of code with #define (e.g. #define MACRO_NAME 123)
  2. Observe that the text following the macro is not highlighted correctly.

Expected behavior: Macro itself would be in a separate colour (default grey in my instance)

Actual behavior: Macro is the same colour as the text of the name (default orange in my instance)

Reproduces how often: Consistently for the above example.

Versions

Atom : 1.32.1
Electron: 2.0.9
Chrome : 61.0.3163.100
Node : 8.9.3
Windows 10 1803

apm 2.1.2
npm 6.2.0
node 8.9.3 x64
atom 1.32.1

@Ben3eeE
Copy link
Contributor

Ben3eeE commented Nov 7, 2018

Thanks for the report 🙇

Having constant identifiers and constant literals colored the same is an expected change with tree-sitter. It seems like the scope applied in textmate was never really correct either since this was scoped as a function name #197.

@thomasjo Do you have any new thoughts about the naming and scopes we can use here?

Right now we scope MACRO_NAME in this issue report as contant.other and a function like macro is scoped as entity.name.function.preprocessor.

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

No branches or pull requests

2 participants