Skip to content

Opening paren matches with closing paren in character literal #25

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

Closed
sebbert opened this issue May 12, 2019 · 2 comments · Fixed by #41
Closed

Opening paren matches with closing paren in character literal #25

sebbert opened this issue May 12, 2019 · 2 comments · Fixed by #41

Comments

@sebbert
Copy link

sebbert commented May 12, 2019

As of version 0.3.0, I get the following:

Code_2019-05-12_19-27-49

@PanAeon
Copy link
Contributor

PanAeon commented Jun 26, 2019

Same problem with back-ticks:
parens

The only thing I've found is that a string literal ")" has got a special token type String and doesn't suffer from the issue.

token_2

I suggest that we add a low priority scope string.quoted.other to the character literal, which will be shadowed by it's "proper scope" constant.character.literal.scala. This will mark token as String and apparently helps the issue:
fixed

As for the backticks I think we should leave them as they are, as rules for them are scattered all over the code, and some vars in backticks shouldn't have any scope at all which prevents the use of above hack.

@olafurpg
Copy link
Contributor

I suggest that we add a low priority scope string.quoted.other to the character literal, which will be shadowed by it's "proper scope" constant.character.literal.scala. This will mark token as String and apparently helps the issue

This sounds like a reasonable approach. I suspect ')' are much more common than backticked identifiers with parentheses.

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 a pull request may close this issue.

3 participants