Commits

camlspotter committed f48d7c5

with_loc

  • Participants
  • Parent commits db12cb1
  • Branches olfend

Comments (0)

Files changed (4)

File boot/ocamlc

Binary file modified.

File boot/ocamldep

Binary file modified.

File boot/ocamllex

Binary file modified.

File olfend/ast.ml

 
 open Asttypes
 
-type exp = 
-    { exp_desc : exp_desc;
-      exp_loc : Location.t 
-    }
+type 'a with_loc = 
+    { desc : 'a;
+      loc : Location.t }
+
+type exp = exp_desc with_loc
 
 and exp_desc = 
   | Exp_ident Longident.t
   | Exp_ifthenelse (exp, exp, exp option)
   | Exp_sequence (exp, exp)
 
-and pat = 
-    { pat_desc : pat_desc;
-      pat_loc : Location.t
-    }
+and pat = pat_desc with_loc
 
 and pat_desc =
   | Pat_any
 
 type structure = structure_item list
 
-and structure_item =
-  { str_desc: structure_item_desc;
-    str_loc: Location.t }
+and structure_item = structure_item_desc with_loc
 
 and structure_item_desc =
   | Str_eval exp