if statement
This commit is contained in:
parent
7242b1b9d1
commit
01699716af
4 changed files with 96 additions and 47 deletions
|
|
@ -12,9 +12,7 @@ run source = do
|
|||
Right tokens -> do
|
||||
let stmtMaybe = parse tokens
|
||||
case stmtMaybe of
|
||||
Left ExpectedExpressionError -> putStrLn "Expected expression"
|
||||
Left MismatchedParenthesesError -> putStrLn "Mismatched parentheses"
|
||||
Left ExpectedSemicolonError -> putStrLn "Expected semicolon"
|
||||
Left (SyntaxError s) -> putStrLn s
|
||||
Right statements -> runStatements statements
|
||||
|
||||
repl :: IO ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue