Commits

Cheikh Younes committed 5aba18d

correct some errors

  • Participants
  • Parent commits 8137a1b

Comments (0)

Files changed (2)

File ps/tests/p3.ps

 /y 20. def
 0. 20. 100. {
 /i exch def
-x x i add y y i add x y 3. 5. rect
+/x x i add  def
+/y y i add  def
+x y 3. 5. rect
 } for
 
 
 
 let rec print_stmt = function 
   Basic(c, s) -> print_coord(c)^print_shape(s) 
-  |Assign(v, e) -> v^" "^print_expr(e) 
+  |Assign(v, e) -> "/"^v^" "^print_expr(e)^" def\n"  
   |Seq(s) -> if(List.length s) = 0 then "" 
               else if (List.length s) = 1 then print_stmt(List.hd s) 
               else print_stmt(List.hd s)^print_stmt(Seq(List.tl s))