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

#if/#ifdef/#elif/#else preprocessor blocks can mess with bracket pairing #4

Open
jyaoma opened this issue Jun 4, 2024 · 1 comment
Labels
bug Something isn't working enhancement New feature or request

Comments

@jyaoma
Copy link
Owner

jyaoma commented Jun 4, 2024

Error "Request textDocument/documentSymbol failed." appears when a preprocessor conditional block contains opening/closing brackets.

image

In the above screenshot, the {s at the end of both conditions are different colors, meaning VSCode thinks it's two different scopes when in reality it's the same scope. Perhaps the extension can automatically comment out the branch that is false?

@jyaoma jyaoma added bug Something isn't working enhancement New feature or request labels Jun 4, 2024
@jyaoma
Copy link
Owner Author

jyaoma commented Jun 4, 2024

Alternatively, the extension can give the user a warning when they try to add unmatched brackets inside these preprocessor conditional blocks. While it's not pretty, logic like this can almost always, if not always, be refactored so that these unmatched brackets don't appear inside preprocessor conditional blocks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant