aboutsummaryrefslogtreecommitdiff
path: root/src/boot/fe/ast.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/fe/ast.ml')
-rw-r--r--src/boot/fe/ast.ml13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/boot/fe/ast.ml b/src/boot/fe/ast.ml
index 6e6483e3..b3a13df8 100644
--- a/src/boot/fe/ast.ml
+++ b/src/boot/fe/ast.ml
@@ -415,6 +415,7 @@ and mod_item' =
| MOD_ITEM_mod of (mod_view * mod_items)
| MOD_ITEM_fn of fn
| MOD_ITEM_obj of obj
+ | MOD_ITEM_const of (ty * expr option)
and mod_item_decl =
{
@@ -1438,6 +1439,18 @@ and fmt_mod_item (ff:Format.formatter) (id:ident) (item:mod_item) : unit =
| MOD_ITEM_obj obj ->
fmt_obj ff id params obj
+
+ | MOD_ITEM_const (ty,e) ->
+ fmt ff "const ";
+ fmt_ty ff ty;
+ begin
+ match e with
+ None -> ()
+ | Some e ->
+ fmt ff " = ";
+ fmt_expr ff e
+ end;
+ fmt ff ";"
end
and fmt_import (ff:Format.formatter) (ident:ident) (name:name) : unit =