Commits

camlspotter committed ecab21f

val

  • Participants
  • Parent commits aae4395

Comments (0)

Files changed (1)

       | KBrace of int
       | KBracket of int
       | KLet of [`Top | `Local ] * int 
+      | KVal 
       | KType of int 
       | KException of int
       | KNone 
       | _ -> false
 
 let rec unwind_top bases = match bases with (* unwind the top *)
-  | { k = KLet (`Top, _) } :: bs -> bs
+  | { k = KLet (`Top, _) } :: bs -> bs (* CR jfuruse: probably we don't need it *)
   | { k = (KStruct _ | KSig _) } :: _ -> bases
   | _ :: bs -> unwind_top bs
   | [] -> []
     | LET ->
         bases0, { k = KLet (`Local, columns); indent = Indent.Set (columns + 2); line } :: bases0
 
+    | VAL -> 
+        let bases = unwind_top bases0 in
+        bases, 
+        { k = KVal; indent = Indent.Set (columns + 2); line } :: bases
+
     | EQUAL ->
         (* CR jfuruse: TODO
            - pre bases
         f bases0
 
     |PREFIXOP _|OPTLABEL _|NATIVEINT _|LABEL _|COMMENT
-    |WHEN|VIRTUAL|VAL|UNDERSCORE|TO|TILDE|
+    |WHEN|VIRTUAL|UNDERSCORE|TO|TILDE|
       SHARP|REC|QUOTE|QUESTIONQUESTION|QUESTION|
       PRIVATE|OR|OF|NEW|MUTABLE|METHOD
           |LESSMINUS|LESS|LBRACKETGREATER|LBRACKETLESS|LBRACKETBAR|