]> ruin.nu Git - proglang.git/blobdiff - Printsyntax.hs
moved modified Testsyntax to Typechecker to keep the original one
[proglang.git] / Printsyntax.hs
index 1d1068749e5bc7d85c4411c7eb9efdf905125d07..0e549511ce4275a12b895072d1a216b7f8bf45e8 100644 (file)
@@ -103,9 +103,9 @@ instance Print Stm where
 
 instance Print Exp where
   prt i e = case e of
+   EAss id exp -> prPrec i 0 (concatD [prt 0 id , doc (showString "=") , prt 0 exp])
    BExp exp0 bop exp -> prPrec i 0 (concatD [prt 1 exp0 , prt 0 bop , prt 1 exp])
    EVar id -> prPrec i 3 (concatD [prt 0 id])
-   EAss id exp -> prPrec i 0 (concatD [prt 0 id , doc (showString "=") , prt 0 exp])
    EInt n -> prPrec i 3 (concatD [prt 0 n])
    ENeg exp -> prPrec i 3 (concatD [doc (showString "-") , prt 3 exp])
    EBool bool -> prPrec i 3 (concatD [prt 0 bool])