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

Provide a different scope for throw when used as a function exception specifier #625

Open
1 task done
akbyrd opened this issue Feb 22, 2023 · 0 comments
Open
1 task done

Comments

@akbyrd
Copy link

akbyrd commented Feb 22, 2023

Checklist

  • This problem exists even with the setting "C_Cpp.enhancedColorization": "Disabled"

The code with a problem is:

void Foo() throw() {}

It looks like:

image

(akbyrd.akbyrd-vsc-theme)

It should look like:

image

The issue is that throw is classified as keyword.control.throw when it is used as a function exception specifier. In this case it's not a control keyword and should be able to be highlighted in a different way compared to throw expression. To be consistent with noexcept I would guess keyword.operator.functionlike, keyword.operator.throw are reasonable scopes.

The desired behavior is similar to how default is either keyword.other.constructor or keyword.control.default.cpp based on the context in which it's used.

microsoft/vscode-cpptools#10544

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

1 participant