Commit eedd1057 authored by POTTIER Francois's avatar POTTIER Francois

Produce comments in the generated .mli file.

parent 26a3eb72
* Include comments in the generated .mli file (Interface)?
* Document the incremental interface
* Confirm and understand why the code back-end slows down by 50%
......
......@@ -50,6 +50,8 @@ and interface_item =
| IIInclude of module_type
(* Submodule. *)
| IIModule of string * module_type
(* Comment. *)
| IIComment of string
and module_type =
| MTNamedModuleType of string
......
......@@ -62,6 +62,7 @@ let entrytypescheme_incremental symbol =
let table_interface =
if Settings.table then [
IIComment "The incremental API.";
IIModule (
interpreter,
MTWithType (
......@@ -71,6 +72,7 @@ let table_interface =
ttoken
)
);
IIComment "The entry points to the incremental API.";
IIValDecls (
StringSet.fold (fun symbol decls ->
(incremental symbol, entrytypescheme_incremental symbol) :: decls
......@@ -82,8 +84,11 @@ let table_interface =
let interface = [
IIFunctor (PreFront.grammar.parameters, [
IIComment "This exception is raised by the monolithic API functions.";
IIExcDecls [ excdef ];
IIComment "The type of tokens.";
IITypeDecls tokentypedef;
IIComment "The monolithic API.";
IIValDecls (
StringSet.fold (fun symbol decls ->
(Misc.normalize symbol, entrytypescheme symbol) :: decls
......
......@@ -685,6 +685,8 @@ and interface_item f = function
fprintf f "include %a%t%t" module_type mt nl nl
| IIModule (name, mt) ->
fprintf f "module %s : %a%t%t" name module_type mt nl nl
| IIComment comment ->
fprintf f "(* %s *)%t" comment nl
and interface f i =
list interface_item nothing f i
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment