Source

ocaml-indent / machine.ml

Diff from to

File machine.ml

 open Sexplib.Conv
 open Pos
 
+module Parser = Xparser
+
 module Stack = struct
 
   type k =
   | None -> true
   | Some t ->
       match t with
-      | COMMENT -> assert false (* COMMENT must be skipped *)
+      | COMMENT _ -> assert false (* COMMENT must be skipped *)
       | STRUCT | SEMISEMI
 
       | UIDENT _|STRING _|OPTLABEL _|NATIVEINT _|LIDENT _|LABEL _|INT64 _|INT32 _
   | Some (i, _) when Region.lnum i.Tokenstr.region <> lnum -> false
   | Some (i, str) ->
       match i.Tokenstr.token with
-      | COMMENT -> lparen_read_ahead lnum str
+      | COMMENT _ -> lparen_read_ahead lnum str
       | FUN -> false
       | FUNCTION -> false
       | _ -> true
   | Some (i, _) when Region.lnum i.Tokenstr.region <> lnum -> false
   | Some (i, str) ->
       match i.Tokenstr.token with
-      | COMMENT -> lparen_read_ahead lnum str
+      | COMMENT _ -> lparen_read_ahead lnum str
       | _ -> true
 
 let lbracket_read_ahead = lbrace_read_ahead
         in
         f bases0
 
-    | COMMENT ->
+    | COMMENT _ ->
         (* Comments are tricky. It is:
 
            - sometimes affected by the previous line's indentation