Skip to content

Commit

Permalink
Parser: FIX add missing ')' to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ccntrq committed Jan 8, 2018
1 parent f8b9a42 commit da6ca40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ forStatement = do
condition <- ifM (notM $ check SEMICOLON)(expression)(return $ Literal (Bool True))
_ <- consume SEMICOLON "Expect ' ' after loop condition."
increment <- ifM (notM $ check RIGHT_PAREN)(liftM Just expression)(return Nothing)
_ <- consume RIGHT_PAREN "Expect ' ' after for clauses."
_ <- consume RIGHT_PAREN "Expect ')' after for clauses."
body <- statement
let body' = maybe body (\inc -> Block [body, Expression inc]) increment
let body'' = While condition body'
Expand Down

0 comments on commit da6ca40

Please sign in to comment.