Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

assert priority #168

Closed
bloodyowl opened this issue Nov 8, 2020 · 4 comments
Closed

assert priority #168

bloodyowl opened this issue Nov 8, 2020 · 4 comments
Labels

Comments

@bloodyowl
Copy link
Contributor

assert 1 == 2

is parsed as

(assert 1) == 2

Wouldn't it have a better UX if we had one of the following?

  • we considered assert like a regular function call (assert(1 == 2))
  • we change the priority to parse as assert (1 == 2)
@IwanKaramazow
Copy link
Contributor

This is a very good idea. I'll look into this. Are you suggesting printing parens as in assert(1 == 2)?

@bloodyowl
Copy link
Contributor Author

Yeah, I think that'd look more familiar if it looked like a regular function call 🙂

@bobzhang
Copy link
Member

bobzhang commented Jan 4, 2021

consider assert as a regular function makes more sense to me assert (1==2)

@stale
Copy link

stale bot commented May 29, 2023

The rescript-lang/syntax repo is obsolete and will be archived soon. If this issue is still relevant, please reopen in the compiler repo (https://github.com/rescript-lang/rescript-compiler) or comment here to ask for it to be moved. Thank you for your contributions.

@stale stale bot added the stale label May 29, 2023
@stale stale bot closed this as completed Jun 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants