Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
POTTIER Francois
menhir
Commits
eedd1057
Commit
eedd1057
authored
Dec 11, 2014
by
POTTIER Francois
Browse files
Produce comments in the generated .mli file.
parent
26a3eb72
Changes
4
Hide whitespace changes
Inline
Side-by-side
TODO
View file @
eedd1057
* Include comments in the generated .mli file (Interface)?
* Document the incremental interface
* Confirm and understand why the code back-end slows down by 50%
...
...
src/IL.mli
View file @
eedd1057
...
...
@@ -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
...
...
src/interface.ml
View file @
eedd1057
...
...
@@ -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
...
...
src/printer.ml
View file @
eedd1057
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment