Skip to content

Commit ec97382

Browse files
committed
remove comments for not nested optional
1 parent 7a1ae54 commit ec97382

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1200
-1194
lines changed

Diff for: jscomp/core/js_exp_make.ml

+4-1
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,17 @@ let merge_outer_comment comment (e : t ) =
156156
= Some (comment ^ sep ^ s)}
157157

158158
let some_comment = Some "Some"
159+
159160
let optional_block e : J.expression =
160161
{ expression_desc = Optional_block (e,false) ;
161162
comment = some_comment
162163
}
164+
165+
163166
let optional_not_nest_block e : J.expression =
164167
{
165168
expression_desc = Optional_block(e,true);
166-
comment = some_comment
169+
comment = None
167170
}
168171

169172
let make_block ?comment tag tag_info es mutable_flag : t =

Diff for: jscomp/test/a_string_test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var suites_000 = /* tuple */[
99
"split",
1010
(function () {
1111
return /* Eq */Block.__(0, [
12-
Ext_string_test.split(/* Some */[true], "hihi", /* "i" */105),
12+
Ext_string_test.split([true], "hihi", /* "i" */105),
1313
/* :: */[
1414
"h",
1515
/* :: */[
@@ -45,7 +45,7 @@ var suites_001 = /* :: */[
4545
"split_empty",
4646
(function () {
4747
return /* Eq */Block.__(0, [
48-
Ext_string_test.split(/* Some */[true], "", /* "i" */105),
48+
Ext_string_test.split([true], "", /* "i" */105),
4949
/* [] */0
5050
]);
5151
})
@@ -55,7 +55,7 @@ var suites_001 = /* :: */[
5555
"split_normal",
5656
(function () {
5757
return /* Eq */Block.__(0, [
58-
Ext_string_test.split(/* Some */[true], "h i i", /* " " */32),
58+
Ext_string_test.split([true], "h i i", /* " " */32),
5959
/* :: */[
6060
"h",
6161
/* :: */[

Diff for: jscomp/test/ast_abstract_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ function zToJs(param) {
187187

188188
function zFromJs(param) {
189189
if (param <= 2 && 0 <= param) {
190-
return /* Some */[param - 0 | 0];
190+
return [param - 0 | 0];
191191
} else {
192192
return /* None */0;
193193
}

Diff for: jscomp/test/ast_js_mapper_poly_test.js

+15-15
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ function eqUOpt(x, y) {
6767
}
6868
}
6969

70-
eq("File \"ast_js_mapper_poly_test.ml\", line 25, characters 5-12", eqUOpt(uFromJs("x"), /* Some */[/* f */102]), true);
70+
eq("File \"ast_js_mapper_poly_test.ml\", line 25, characters 5-12", eqUOpt(uFromJs("x"), [/* f */102]), true);
7171

72-
eq("File \"ast_js_mapper_poly_test.ml\", line 26, characters 5-12", eqUOpt(uFromJs("D"), /* Some */[/* D */68]), true);
72+
eq("File \"ast_js_mapper_poly_test.ml\", line 26, characters 5-12", eqUOpt(uFromJs("D"), [/* D */68]), true);
7373

74-
eq("File \"ast_js_mapper_poly_test.ml\", line 27, characters 5-12", eqUOpt(uFromJs("C"), /* Some */[/* C */67]), true);
74+
eq("File \"ast_js_mapper_poly_test.ml\", line 27, characters 5-12", eqUOpt(uFromJs("C"), [/* C */67]), true);
7575

7676
eq("File \"ast_js_mapper_poly_test.ml\", line 28, characters 5-12", eqUOpt(uFromJs("f"), /* None */0), true);
7777

@@ -153,12 +153,12 @@ eq("File \"ast_js_mapper_poly_test.ml\", line 55, characters 5-12", $$Array.map(
153153
5,
154154
6
155155
]), /* array */[
156-
/* Some */[/* A0 */0],
156+
[/* A0 */0],
157157
/* None */0,
158158
/* None */0,
159-
/* Some */[/* A1 */1],
160-
/* Some */[/* A2 */2],
161-
/* Some */[/* A3 */3],
159+
[/* A1 */1],
160+
[/* A2 */2],
161+
[/* A3 */3],
162162
/* None */0
163163
]);
164164

@@ -168,7 +168,7 @@ function v1ToJs(param) {
168168

169169
function v1FromJs(param) {
170170
if (param <= 5 && 0 <= param) {
171-
return /* Some */[param - 0 | 0];
171+
return [param - 0 | 0];
172172
} else {
173173
return /* None */0;
174174
}
@@ -201,12 +201,12 @@ eq("File \"ast_js_mapper_poly_test.ml\", line 69, characters 5-12", $$Array.map(
201201
6
202202
]), /* array */[
203203
/* None */0,
204-
/* Some */[/* B0 */0],
205-
/* Some */[/* B1 */1],
206-
/* Some */[/* B2 */2],
207-
/* Some */[/* B3 */3],
208-
/* Some */[/* B4 */4],
209-
/* Some */[/* B5 */5],
204+
[/* B0 */0],
205+
[/* B1 */1],
206+
[/* B2 */2],
207+
[/* B3 */3],
208+
[/* B4 */4],
209+
[/* B5 */5],
210210
/* None */0
211211
]);
212212

@@ -216,7 +216,7 @@ function v2ToJs(param) {
216216

217217
function v2FromJs(param) {
218218
if (param <= 7 && 2 <= param) {
219-
return /* Some */[param - 2 | 0];
219+
return [param - 2 | 0];
220220
} else {
221221
return /* None */0;
222222
}

0 commit comments

Comments
 (0)