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)
commit0d60a0af6b11db89bee6ee8377be3d3f0aae715e
tree9cd560f03a2d678bf64b1122d1475e82a7868415
parent7d4a5a11fdf751673d3f1a62e3f19fd6e2587af0
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