Kaynağa Gözat

Added some documentation headers

Taddeus Kroes 12 yıl önce
ebeveyn
işleme
191c9bb195
1 değiştirilmiş dosya ile 8 ekleme ve 1 silme
  1. 8 1
      types.mli

+ 8 - 1
types.mli

@@ -1,5 +1,7 @@
 (** Type definitions for abstract syntax tree, assembly code, and exceptions. *)
 
+(** {2 Abstract Syntax Tree} *)
+
 (** [(filename, startline, endline, startcol, endcol)]
     Location of node in source code. Used for error reporting. *)
 type location = string * int * int * int * int
@@ -109,6 +111,8 @@ and node =
   | Cond of node * node * node * ann         (* cond, true_expr, false_expr *)
   | DummyNode                                (* null node, pruned by traversals *)
 
+(** {2 Assembly instructions} *)
+
 type stack_scope = Glob | Local | Rel of int | Current
 type rtn_scope = ExternFun of int | LocalFun of int * string
 type instr =
@@ -159,6 +163,8 @@ type instr =
   | EmptyLine
   | DummyInstr
 
+(** {2 General} *)
+
 (* Intermediate representations between phases *)
 type intermediate =
   | Empty
@@ -176,7 +182,8 @@ type args_record = {
   mutable endphase : string;
 }
 
-(* Exceptions *)
+(** {2 Exceptions} *)
+
 exception LocError of location * string
 exception NodeError of node * string
 exception CompileError of string