Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (47 sloc) 2.12 KB
Copyright © 2011 MLstate
This file is part of OPA.
OPA is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License, version 3, as published by
the Free Software Foundation.
OPA is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
more details.
You should have received a copy of the GNU Affero General Public License
along with OPA. If not, see <>.
Support for opadoc
@author Rudy Sicard
@author Adrien Jonquet
@author Frédéric Tuong (process of type declaration)
@author Mathieu Barbin (documentation, refactoring)
This pass implements the compiler part of the opadoc generation,
which means collecting types of values to document, and producing
some api files used by opadoc to generate the complete documentation
(comments + types from api files)
This pass does not take care about comments, this is done by opadoc.
The production of api files is done in 2 passes, because of the number
of the code transformations appearing in the compiler before we
can actually type the code.
The first pass ([process_opa]) adds some directive arround elements to document,
and the second pass ([process_qml]) is after typing, runs through the code,
and collect the directives put by the first pass, and add types infos.
Api generated files are using Json format, a format supported natively
by opa, so that opadoc (an application written in opa) can get the types
generated by the compiler (an application written in ocaml)
val process_opa :
options:OpaEnv.opa_options ->
[< SurfaceAst.all_directives
> `coerce `deprecated `doctype `local `module_ `package
`private_ `public `side_annotation `visibility_annotation ]
as 'c) Passes.sa_env_Gen ->
(Ident.t, 'c) Passes.sa_env_Gen
val process_qml :
options:OpaEnv.opa_options ->
'a Passes.env_Gen -> 'a Passes.env_Gen
Something went wrong with that request. Please try again.