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

No semantic token information for alignas keyword #10546

Closed
akbyrd opened this issue Feb 19, 2023 · 2 comments
Closed

No semantic token information for alignas keyword #10546

akbyrd opened this issue Feb 19, 2023 · 2 comments
Assignees
Labels

Comments

@akbyrd
Copy link

akbyrd commented Feb 19, 2023

Environment

OS and Version: Windows 10 22H2 19045
VS Code Version: 1.75.1
C/C++ Extension Version: 1.14.3

Bug Summary and Steps to Reproduce

Bug Summary:

The built-in textmate grammar doesn't handle alignas(n) on a struct well. Note how the parentheses end up highlighted. The opening paren is actually part of the alignas token so there's no way to color the keyword without coloring the parens.

image

This is a place we we need a little help from the extension. The extension should emit a semantic token for alignas.

Configuration and Logs

N/A

Other Extensions

No response

Additional context

No response

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Feb 21, 2023

It doesn't need to be (and shouldn't be) a semantic token. The TextMake scopes come from VS Code itself, which come from https://github.com/jeff-hykin/better-cpp-syntax/issues , so you should report this bug there.

The current behavior seems fine to me though and I'm not sure exactly what change you want with the lexical tokens.

@sean-mcmanus sean-mcmanus closed this as not planned Won't fix, can't repro, duplicate, stale Feb 21, 2023
@akbyrd
Copy link
Author

akbyrd commented Feb 23, 2023

I'm not sure exactly what change you want with the lexical tokens.

The parenthesis should not be part of the token. No other keyword includes the parenthesis.

Looks like alignas has a bit of history.
jeff-hykin/better-cpp-syntax#215
jeff-hykin/better-cpp-syntax#497
jeff-hykin/better-cpp-syntax#626

@github-actions github-actions bot locked and limited conversation to collaborators Apr 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants