diff options
author | Juan J. Martinez <jjm@usebox.net> | 2022-09-09 12:41:03 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2022-09-09 12:41:03 +0100 |
commit | cdf88f13008cd3f6511d466c1078ae7b2f983faf (patch) | |
tree | a881aac3c0db1377d667955120bbf26fa4894b6f /test/Language.hs | |
parent | 69c02169ef381d394323e9d26d0cb48db89fb7d4 (diff) | |
download | micro-lang-hs-cdf88f13008cd3f6511d466c1078ae7b2f983faf.tar.gz micro-lang-hs-cdf88f13008cd3f6511d466c1078ae7b2f983faf.zip |
Refactored the compiler result to plug in the code generator
Also some tweaks in error reporting.
Diffstat (limited to 'test/Language.hs')
-rw-r--r-- | test/Language.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/Language.hs b/test/Language.hs index 6680178..9f47008 100644 --- a/test/Language.hs +++ b/test/Language.hs @@ -25,7 +25,7 @@ expectError input etyp = do Left e -> assertFailure $ show e Right ast -> do res <- return $ evalState (compileAll ast) startState - case res of + case crExit res of Left e -> case (find (\(E.Error t _ _) -> t == etyp) e) of Just _ -> return () Nothing -> assertFailure $ "expected " ++ show etyp ++ " didn't happen, got instead:\n" ++ unlines (map (\(E.Error t _ _) -> show t) e) |