Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 54 lines (43 sloc) 1.809 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 *)
f2ce0c4 [doc] qmljsimp: adding, removing, updating comments
Valentin Gatien-Baron authored
18
19 (* the environment that does not vary while compiling *)
fccc685 Initial open-source release
MLstate authored
20 type env = {
21 options : Qml2jsOptions.t;
22 gamma : QmlTypes.gamma;
23 annotmap : QmlAst.annotmap;
24 val_ : string -> Ident.t;
25 private_bymap : Imp_Bsl.JsImpBSL.ByPassMap.t;
26 renaming_client : QmlRenamingMap.t;
27 renaming_server : QmlRenamingMap.t;
28 }
29
f2ce0c4 [doc] qmljsimp: adding, removing, updating comments
Valentin Gatien-Baron authored
30 (* the environment that is passed around as an accumulator *)
fccc685 Initial open-source release
MLstate authored
31 type private_env = {
32 local_vars : JsAst.ident list;
f2ce0c4 [doc] qmljsimp: adding, removing, updating comments
Valentin Gatien-Baron authored
33 renaming : JsAst.ident IdentMap.t; (* a local renaming of the parameters of functions
34 * used when squashing together the body of mutually
35 * recursive functions *)
fccc685 Initial open-source release
MLstate authored
36 no_warn_x : unit;
37 }
38
39 (**
40 Dealing with the generation of local variables
41 *)
42 val next_exprident : private_env -> Ident.t -> private_env * JsAst.ident
43 val next : private_env -> string -> private_env * JsAst.ident
44
45 (**
46 Generation of parameters
47 *)
48 val next_param : string -> JsAst.ident
49
50 val declare_local_vars : private_env -> private_env * JsAst.statement
51 val maybe_declare_local_vars : private_env -> private_env * JsAst.statement option
52
53 val reset_renaming : private_env -> private_env
Something went wrong with that request. Please try again.