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

add static_assert #139

Merged
merged 1 commit into from
May 4, 2019
Merged

add static_assert #139

merged 1 commit into from
May 4, 2019

Conversation

matter123
Copy link
Collaborator

@matter123 matter123 commented May 2, 2019

This PR adds support for the static_assert and _Static_assert keywords.

Why?

static_assert is currently (1.8.8) marked as entity.name.function when it is rather a function-like keyword, marking it as a keyword fixes the coloring.

Additionally, as #80 progresses this will cause issues if left unattended as static_assert is allowed in places where normal function calls are not.static_assert(1==1); is a completely valid C++ program (goodbolt).
As the distinction is made between function calls and function declarations, static_assert's insides may end up with undesirable coloring.

@jeff-hykin
Copy link
Owner

Something weird is going on with the
keyword.static_assert.cpp.c instead of
keyword.static_assert.c

The grammar class should have automatically fixed that so I'm going to look into what is going on

@jeff-hykin jeff-hykin merged commit 3b42f58 into master May 4, 2019
@jeff-hykin
Copy link
Owner

Took awhile to fix. In the textmate_tools the changes were being done as mutations, I changed it to be more of a functional style, all changes are done with a copy, and the copy is returned. I also fixed the other leftover .cpp values in the c syntax.

@matter123 matter123 deleted the Add-static_assert branch May 5, 2019 20:07
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

Successfully merging this pull request may close these issues.

2 participants