JarrettBillingsley / Croc

Croc is an extensible extension language in the vein of Lua, which also wishes it were a standalone language. Also it's fun.
http://www.croc-lang.org
79 stars 12 forks source link

Put && and || on the same operator precedence level #104

Closed JarrettBillingsley closed 10 years ago

JarrettBillingsley commented 10 years ago

It bugs the hell out of me when I forget to put parentheses in the right places and the compiler eats it but spits out stupid code that doesn't do the right thing. Putting them at the same level makes it an error to forget the parentheses.

JarrettBillingsley commented 10 years ago

Derp. This doesn't really solve it, since then you can't write a && b && c or a || b || c. Then.... what DOES need to happen?

JarrettBillingsley commented 10 years ago

Maybe, then, if it parses an && or ||, then it will only allow subsequent &&s and ||s.