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>
Mon, 3 Jun 2019 14:44:14 +0000 (15:44 +0100)
commitdfaf05671c2c0363d80bdbc6f737a536ed620a80
tree9cd560f03a2d678bf64b1122d1475e82a7868415
parentd0b62622cd06b9dafd2e3b4290a00d54ac2995f7
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