Skip to content

Commit e76fb73

Browse files
committedSep 9, 2019
Changes to the cases in switch were not committed.
1 parent c0e67e9 commit e76fb73

Some content is hidden

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

79 files changed

+7474
-7413
lines changed
 

‎jscomp/core/j.ml

+1
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ and 'a case_clause = {
329329
switch_case : 'a ;
330330
switch_body : block ;
331331
should_break : bool ; (* true means break *)
332+
comment : string option ;
332333
}
333334

334335
(* TODO: For efficency: block should not be a list, it should be able to

‎jscomp/core/js_dump.ml

+2-1
Original file line numberDiff line numberDiff line change
@@ -499,12 +499,13 @@ and pp_function is_method
499499
and pp_one_case_clause : 'a .
500500
_ -> P.t -> (P.t -> 'a -> unit) -> 'a J.case_clause -> _
501501
= fun cxt f pp_cond
502-
({switch_case; switch_body ; should_break } : _ J.case_clause) ->
502+
({switch_case; switch_body ; should_break; comment; } : _ J.case_clause) ->
503503
let cxt =
504504
P.group f 1 (fun _ ->
505505
P.group f 1 (fun _ ->
506506
P.string f L.case;
507507
P.space f ;
508+
pp_comment_option f comment;
508509
pp_cond f switch_case; (* could be integer or string *)
509510
P.space f ;
510511
P.string f L.colon );

0 commit comments

Comments
 (0)