Skip to content
This repository
tree: 8e28487662
Fetching contributors…

Cannot retrieve contributors at this time

file 58 lines (47 sloc) 2.173 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
(*
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 <http://www.gnu.org/licenses/>.
*)
(**
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 ->
  (Ident.t,
   [< 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.