Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 59 lines (47 sloc) 2.173 kb
fccc685 Initial open-source release
MLstate authored
1 (*
2 Copyright © 2011 MLstate
3
4 This file is part of OPA.
5
6 OPA is free software: you can redistribute it and/or modify it under the
7 terms of the GNU Affero General Public License, version 3, as published by
8 the Free Software Foundation.
9
10 OPA is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
13 more details.
14
15 You should have received a copy of the GNU Affero General Public License
16 along with OPA. If not, see <http://www.gnu.org/licenses/>.
17 *)
18 (**
19 Support for opadoc
20
21 @author Rudy Sicard
22 @author Adrien Jonquet
23 @author Frédéric Tuong (process of type declaration)
24 @author Mathieu Barbin (documentation, refactoring)
25 *)
26
27 (**
28 This pass implements the compiler part of the opadoc generation,
29 which means collecting types of values to document, and producing
30 some api files used by opadoc to generate the complete documentation
31 (comments + types from api files)
32
33 This pass does not take care about comments, this is done by opadoc.
34
35 The production of api files is done in 2 passes, because of the number
36 of the code transformations appearing in the compiler before we
37 can actually type the code.
38 The first pass ([process_opa]) adds some directive arround elements to document,
39 and the second pass ([process_qml]) is after typing, runs through the code,
40 and collect the directives put by the first pass, and add types infos.
41
42 Api generated files are using Json format, a format supported natively
43 by opa, so that opadoc (an application written in opa) can get the types
44 generated by the compiler (an application written in ocaml)
45 *)
46
47 val process_opa :
48 options:OpaEnv.opa_options ->
49 (Ident.t,
50 [< SurfaceAst.all_directives
51 > `coerce `deprecated `doctype `local `module_ `package
52 `private_ `public `side_annotation `visibility_annotation ]
53 as 'c) Passes.sa_env_Gen ->
54 (Ident.t, 'c) Passes.sa_env_Gen
55
56 val process_qml :
57 options:OpaEnv.opa_options ->
58 'a Passes.env_Gen -> 'a Passes.env_Gen
Something went wrong with that request. Please try again.