Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unary operator followed by a space #324

Closed
phil294 opened this issue Feb 2, 2023 · 4 comments
Closed

Unary operator followed by a space #324

phil294 opened this issue Feb 2, 2023 · 4 comments

Comments

@phil294
Copy link

phil294 commented Feb 2, 2023

! x

fails with ParseError

@STRd6
Copy link
Contributor

STRd6 commented Feb 2, 2023

Thanks for the report! Currently unary operators don't allow whitespace between the operator and the operand. It may be possible to relax this for some operators in some situations but I'll have to think about it further.

@STRd6
Copy link
Contributor

STRd6 commented Feb 2, 2023

My main concern is if we add a future a ! b binary op then I wouldn't want people to have gotten used to ! x in the meantime.

@edemaine
Copy link
Collaborator

edemaine commented Feb 2, 2023

Note: not (currently behind coffeeNot flag, but see #287) allows whitespace after it, so that's an alternative to use.

@edemaine edemaine changed the title Exclamation mark with space Unary operator followed by a space Feb 8, 2023
@STRd6
Copy link
Contributor

STRd6 commented Feb 10, 2023

We're not currently planning to change this but please re-open the issue if you have other ideas about it.

@STRd6 STRd6 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 10, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants