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

Special case navigation with force unwrap #36

Merged
merged 1 commit into from
Oct 17, 2021

Conversation

alex-pinkus
Copy link
Owner

Fixes #16

Force unwrapping during navigation should just fall naturally out of
the normal postfix operator combined with a basic navigation expression.
Unfortunately, life isn't that simple, and it gets parsed as a custom
infix operator instead. We can nudge things in the right direction by
just declaring a !. operator, even though no such operator truly
exists.

Fixes #16

Force unwrapping during navigation _should_ just fall naturally out of
the normal postfix operator combined with a basic navigation expression.
Unfortunately, life isn't that simple, and it gets parsed as a custom
infix operator instead. We can nudge things in the right direction by
just declaring a `!.` operator, even though no such operator truly
exists.
@alex-pinkus alex-pinkus merged commit 04c59a7 into main Oct 17, 2021
@alex-pinkus alex-pinkus deleted the navigation-force-unwrap branch October 17, 2021 16:33
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.

Navigation using force-unwrap is parsed as an infix expression with a custom operator
1 participant