Define (some) semantic errors
[tiger.ml.git] / compiler / src / lib / tiger / tiger_absyn.ml
index 6e4a7e9..73a081a 100644 (file)
@@ -175,6 +175,21 @@ and fundec =
 
 type t = exp
 
+(* For printing error messages *)
+let op_show op =
+  match op with
+  | PlusOp   -> "+"
+  | MinusOp  -> "-"
+  | TimesOp  -> "*"
+  | DivideOp -> "/"
+  | EqOp     -> "="
+  | NeqOp    -> "<>"
+  | LtOp     -> "<"
+  | LeOp     -> "<="
+  | GtOp     -> ">"
+  | GeOp     -> ">="
+
+(* For printing AST *)
 let op_to_string op =
   match op with
   | PlusOp   -> "PlusOp"
This page took 0.025397 seconds and 4 git commands to generate.