Development summary for February 18, 2015
Today, mostly just cleaned a lot of (h)lint out of Phaestus (lots of unnecessary parentheses removed), but I also rewrote some of the subparsers to return strings instead of single chars or voids, in case I ever decide I want to capture the actual text recognized for some reason. Reorganized some code for better readability; also moved most of the subparsers out of the top-level of the Tokenizer.hs file (mostly to shut up HLint because I don't have type declarations on all of them, lazy me).
I especially think rewriting
optional (PC.char 'b') >> (PC.string "???") >> tabsAndSpaces >> (ident <|> (between (PC.char '\'') (PC.char '\'') ident) <|> (between (PC.char '"') (PC.char '"') ident)) >> nl
as
do bflag <- optionMaybe (PC.char 'b') _ <- PC.string ">>>" _ <- tabsAndSpaces lbl <- ident <|> between (PC.char '\'') (PC.char '\'') ident <|> between (PC.char '"') (PC.char '"') ident _ <- nl
is a massive improvement in readability (note, the semantics of these are not identical, and neither snippet is complete, no need towrite me to tell me that my code is broken. :)








