Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we have token for explicitly UPPER_CASED variable? #645

Open
rokoroku opened this issue Aug 15, 2018 · 3 comments
Open

Can we have token for explicitly UPPER_CASED variable? #645

rokoroku opened this issue Aug 15, 2018 · 3 comments

Comments

@rokoroku
Copy link

rokoroku commented Aug 15, 2018

TS and JS Grammar Extension version: 0.0.43 / latest

Code

// Please include a code snippet that demonstrates the issue
const UPPER_CASED_CONSTANTS_VARIABLE = 1;
const lower_cased_variable = 2;

#542
858d33f

Prior to above fix, we can have UPPER_CASED variable as a constant so we can apply style for the uppercased constant differently, however, it's impossible now

Is it possible to have uppercased constant variable as another token? (e.g. variables.uppercased.constants, variable.uppercased.readwrite, ...)

@sheetalkamat
Copy link
Member

Upper cased variables are still constants:

For: const UPPER_CASED_CONSTANTS_VARIABLE = 1;
Scope:                         source.ts
                               meta.var.expr.ts
                               meta.var-single-variable.expr.ts
                               meta.definition.variable.ts
                               variable.other.constant.ts

For: var UPPER_CASED_CONSTANTS_VARIABLE = 1;
Scope:                         source.ts
                               meta.var.expr.ts
                               meta.var-single-variable.expr.ts
                               meta.definition.variable.ts
                               variable.other.constant.ts

@rokoroku
Copy link
Author

@sheetalkamat

I meant, I want to distinguish between UPPER_CASED and other-cased variables.

@fdln
Copy link

fdln commented Oct 15, 2018

@rokoroku
Agree, it will good to see syntax highlighting like this:

screen shot 2018-10-16 at 01 26 17

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

No branches or pull requests

3 participants