-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Compiler: Parse infix bitwise operators #297
Comments
@ospencer you cool if I take this one? |
Also, what's the tbd on |
@bmakuh Absolutely! |
The tbd on Now that I think about it though, we can totally unambiguously parse when it's an infix operator versus when it's a prefix operator. |
If you feel like giving that a shot, definitely give it a go. It may be a little annoying depending on your experience with parser generators (and more specifically dypgen), but we could also pair on it if it gives you a headache! |
Here's where we keep all of the operator precedences: https://github.com/grain-lang/grain/blob/master/docs/contributor/operator_precedence.md |
@ospencer sorry just finally getting around to this. For these operators, is this what you were intending?
|
Also, do we want a NOT operator like |
Yup, And yeah, we don't want |
Ok, thanks. And is there any danger of ambiguity between an infix bitwise pipe operator and other uses of the pipe? I guess we're not using it for |
There shouldn't be! It's only used for |
This was completed by #425 🎉 |
Even if they aren't defined yet, we should still parse
&
,|
,^
(tbd),<<
,>>
, and>>>
so they can be used.The text was updated successfully, but these errors were encountered: