joews / peach

A functional programming language
MIT License
3 stars 0 forks source link

Infix operators #22

Closed joews closed 7 years ago

joews commented 7 years ago

I wasn't going to go there. But infix assignment next to prefix equality doesn't feel right:

x = 2
(== x 2)

vs

x = 2
x == 2

Like #23 this will need some parser refactoring to avoid left recursion (not allowed in PEG).

Precedence could be handled in the parser or interpreter. The latter means a smaller grammar and the possibility of user-defined infix operators down the line, but I don't plan for Peach to have those.

joews commented 7 years ago

Done in #44