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

[Ruby] Null-safe accessor #3813

Open
michaelblyons opened this issue Jul 31, 2023 · 0 comments · May be fixed by #4109
Open

[Ruby] Null-safe accessor #3813

michaelblyons opened this issue Jul 31, 2023 · 0 comments · May be fixed by #4109
Labels
C: Syntax T: bug A bug in an existing language feature

Comments

@michaelblyons
Copy link
Collaborator

michaelblyons commented Jul 31, 2023

What happened?

In Ruby, &. is a null-safe property accessor like ?. in some other languages.

foo[0]&.bar
#     ^^ punctuation.accessor - keyword

I think all that's needed is a negative lookahead for (?!\.) on the bitwise & and &? on the various accessor matches.

@deathaxe deathaxe added T: bug A bug in an existing language feature C: Syntax labels Aug 3, 2023
michaelblyons added a commit to michaelblyons/SublimeSyntax-Defaults that referenced this issue Dec 5, 2024
@michaelblyons michaelblyons linked a pull request Dec 5, 2024 that will close this issue
michaelblyons added a commit to michaelblyons/SublimeSyntax-Defaults that referenced this issue Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Syntax T: bug A bug in an existing language feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants