Skip to content

Commit 2aaa0b1

Browse files
mununkicristianoc
authored andcommitted
add Jsx
1 parent 97ac6ee commit 2aaa0b1

16 files changed

+2977
-17
lines changed

jscomp/frontend/ppx_entry.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ let rewrite_signature (ast : Parsetree.signature) : Parsetree.signature =
4242
else
4343
let result = unsafe_mapper.signature unsafe_mapper ast in
4444
(* Keep this check, since the check is not inexpensive*)
45-
(* Bs_ast_invariant.emit_external_warnings_on_signature result; *)
45+
Bs_ast_invariant.emit_external_warnings_on_signature result;
4646
result
4747

4848
let rewrite_implementation (ast : Parsetree.structure) : Parsetree.structure =
@@ -62,5 +62,5 @@ let rewrite_implementation (ast : Parsetree.structure) : Parsetree.structure =
6262
else
6363
let result = unsafe_mapper.structure unsafe_mapper ast in
6464
(* Keep this check since it is not inexpensive*)
65-
(* Bs_ast_invariant.emit_external_warnings_on_structure result; *)
65+
Bs_ast_invariant.emit_external_warnings_on_structure result;
6666
result

jscomp/main/builtin_cmi_datasets.ml

+7-1
Large diffs are not rendered by default.

jscomp/main/builtin_cmj_datasets.ml

+7-1
Large diffs are not rendered by default.

jscomp/others/jsx.ml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
(* Copyright (C) 2015-2016 Bloomberg Finance L.P.
2+
*
3+
* This program is free software: you can redistribute it and/or modify
4+
* it under the terms of the GNU Lesser General Public License as published by
5+
* the Free Software Foundation, either version 3 of the License, or
6+
* (at your option) any later version.
7+
*
8+
* In addition to the permissions granted to you by the LGPL, you may combine
9+
* or link a "work that uses the Library" with a publicly distributed version
10+
* of this file to produce a combined library or application, then distribute
11+
* that combined work under the terms of your choosing, with no requirement
12+
* to comply with the obligations normally placed on you by section 4 of the
13+
* LGPL version 3 (or the corresponding section of a later version of the LGPL
14+
* should you choose to use a later version).
15+
*
16+
* This program is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU Lesser General Public License for more details.
20+
*
21+
* You should have received a copy of the GNU Lesser General Public License
22+
* along with this program; if not, write to the Free Software
23+
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
24+
25+
type element
26+
type ref
27+
28+
external null : element = "null" [@@bs.val]
29+
external float : float -> element = "%identity"
30+
external int : int -> element = "%identity"
31+
external string : string -> element = "%identity"
32+
external array : element array -> element = "%identity"
33+
34+
type ('props, 'return) componentLike = 'props -> 'return
35+
type 'props component = ('props, element) componentLike
36+
37+
(* this function exists to prepare for making `component` abstract *)
38+
external component : ('props, element) componentLike -> 'props component
39+
= "%identity"

0 commit comments

Comments
 (0)