Source

ocaml-indent / tests / style.ml

The default branch has multiple heads

Full commit
(* ( / { / [ + newline does not move the indent to the token's column,
   but just shifts the indent.

   Comments are allowed between the parens and newline.
*)

let _ = ( (* indent += 2 *)
  1,
  2,
  3
) (* closing corresponds the line indent of the opening *)
  
(* If something follows after (, {, [ in the line, 
   these open-parens introduce a block.
   The indent is moved to the columns of the open-parens.
*)

let _ = ( 1,
          2,
          3 
        ) (* closing corresponds the line indent of the opening *)

(* See the same in type definitions *)

type t = { x : foo;
           y : boo 
         }

type t = {
  x : foo;
  y : boo;
}