<s>Start parsing expressions
authorLuke Lau <luke_lau@icloud.com>
Sat, 18 May 2019 15:53:40 +0000 (16:53 +0100)
committerLuke Lau <luke_lau@icloud.com>
Mon, 3 Jun 2019 14:43:49 +0000 (15:43 +0100)
commitd0b62622cd06b9dafd2e3b4290a00d54ac2995f7
tree628c7e3908b128796541abb96ad3c71c3856eed5
parent30a26b7d2b0e17ea523ee34cb5d37242a38882df
<s>Start parsing expressions

This starts off with defining not the AST, but just what expressions we
want to be able to parse.
So far we just handle numbers, and addition involving 2 numbers.
We use the built-in ReadPrec parser combinators, which allow us to
recursively parse the binary op of addition, and even allow us to reuse
the Read instance on Int!
prec and step are needed since without them, parseAdd will just get
stuck repeatedly trying to parse the left expression (a).
AST.hs [new file with mode: 0644]