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 parens to annotation of lexed symboly segments #4689

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

ChrisPenner
Copy link
Contributor

Overview

Fixes #4682
Fixes #4676

The annotations for operators like (++) only span the ++, so the brackets get duplicated.

Fixed this by just including the span of the parens into the lexer token for symboly names like this.

Implementation notes

Include the span of the parens in the lexer tokens for symboly names.

Test coverage

Added cases to the formatter transcript

@aryairani
Copy link
Contributor

Great!

@aryairani aryairani merged commit 36fdcd8 into trunk Feb 12, 2024
7 checks passed
@aryairani aryairani deleted the cp/fix-lexer-parens branch February 12, 2024 20:54
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.

LSP formatting breaks definition of custom operators Roundtrip error in LSP for point-free operators
2 participants