Parse more binary ops
authorLuke Lau <luke_lau@icloud.com>
Sat, 18 May 2019 16:17:41 +0000 (17:17 +0100)
committerLuke Lau <luke_lau@icloud.com>
Sat, 18 May 2019 22:35:42 +0000 (23:35 +0100)
commitd6cecbbf067560322e391363250fd3c5d45bfbec
tree9cd560f03a2d678bf64b1122d1475e82a7868415
parentae80d076cba678169dbddac4a53edd2cb1e091fb
Parse more binary ops

We can parameterise the precedence that we parse so that * is parsed
before +/- etc.
Try it out with `ghci AST.hs`, and see the difference between
*AST> read "1 * 2 - 3"
and
*AST> read "1 + 2 - 3"
AST.hs