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

Nullish coalescing operator (stage-1 proposal) treated as ternary, breaks highlighting #495

Closed
MiracleBlue opened this issue Apr 28, 2018 · 2 comments

Comments

@MiracleBlue
Copy link

Howdy!

I've been making heavy use of some recent early-stage ES proposals, such as Nullish Coalescing. Currently, language-babel is treating the operator as 2 ternaries, and as such, highlighting in the rest of a function block after this operator is a bit broken.

Example:
screen shot 2018-04-29 at 9 18 31 am

The first two functions in that screenshot use the nullish coalescing operator, and the closing brackets and parenthesise don't seem to be tokenized anymore (evidenced by the absence of highlighting and absence of scope classes in the inspector for those pieces)

From inspecting the scopes applied to the operator, each ? is wrapped with these scopes: keyword operator ternary js

Atom: 1.26.1
language-babel: 2.84.0
OS: macOS 10.13.4

@xixixao
Copy link

xixixao commented Apr 29, 2018

Came here to post the same 👍

gandm pushed a commit that referenced this issue Apr 29, 2018
@gandm gandm closed this as completed in 1e2dd93 Apr 29, 2018
@MiracleBlue
Copy link
Author

WOW that was fast. Thanks so much @gandm for your efforts!

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

No branches or pull requests

2 participants