You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/4.06.1/unstable/js_compiler.ml
+152-8
Original file line number
Diff line number
Diff line change
@@ -86740,6 +86740,151 @@ let o = o#required_modules _x1 in
86740
86740
let o = o#option (fun o -> o#string) _x2 in o
86741
86741
end
86742
86742
86743
+
end
86744
+
module Js_iter
86745
+
= struct
86746
+
#1 "js_iter.ml"
86747
+
86748
+
open J
86749
+
class virtual iter =
86750
+
object ((o : 'self_type))
86751
+
method unknown : 'a. 'a -> unit = ignore
86752
+
method string : string -> unit = ignore
86753
+
method option :
86754
+
'a. ('self_type -> 'a -> unit) -> 'a option -> unit =
86755
+
fun _f_a -> function | None -> () | Some _x -> _f_a o _x
86756
+
method list :
86757
+
'a. ('self_type -> 'a -> unit) -> 'a list -> unit =
86758
+
fun _f_a ->
86759
+
function
86760
+
| [] -> ()
86761
+
| _x :: _x_i1 -> _f_a o _x ; o#list _f_a _x_i1
86762
+
method int32 : int32 -> unit = ignore
86763
+
method int : int -> unit = ignore
86764
+
method bool : bool -> unit = ignore
86765
+
method label : label -> unit = o#string
86766
+
method binop : binop -> unit = o#unknown
86767
+
method int_op : int_op -> unit = o#unknown
86768
+
method kind : kind -> unit = o#unknown
86769
+
method property : property -> unit = o#unknown
86770
+
method number : number -> unit = o#unknown
86771
+
method mutable_flag : mutable_flag -> unit = o#unknown
86772
+
method ident_info : ident_info -> unit = o#unknown
86773
+
method exports : exports -> unit = o#unknown
86774
+
method tag_info : tag_info -> unit = o#unknown
86775
+
method required_modules : required_modules -> unit = o#list (fun o -> o#module_id)
86776
+
method property_name : property_name -> unit = o#unknown
86777
+
method ident : ident -> unit = o#unknown
86778
+
method module_id : module_id -> unit = fun { id = _x0;kind = _x1} -> begin o#ident _x0;o#unknown _x1 end
86779
+
method vident : vident -> unit = function
86780
+
| Id ( _x0) ->
86781
+
begin o#ident _x0 end
86782
+
|Qualified ( _x0,_x1) ->
86783
+
begin o#module_id _x0 ;o#option (fun o -> o#string) _x1 end
86784
+
method exception_ident : exception_ident -> unit = o#ident
86785
+
method for_ident : for_ident -> unit = o#ident
86786
+
method for_direction : for_direction -> unit = o#unknown
86787
+
method property_map : property_map -> unit = o#list (fun o -> fun ( _x0,_x1) -> begin o#property_name _x0;o#expression _x1 end)
86788
+
method length_object : length_object -> unit = o#unknown
86789
+
method expression_desc : expression_desc -> unit = function
86790
+
| Length ( _x0,_x1) ->
86791
+
begin o#expression _x0 ;o#length_object _x1 end
86792
+
|Char_of_int ( _x0) ->
86793
+
begin o#expression _x0 end
86794
+
|Char_to_int ( _x0) ->
86795
+
begin o#expression _x0 end
86796
+
|Is_null_or_undefined ( _x0) ->
86797
+
begin o#expression _x0 end
86798
+
|String_append ( _x0,_x1) ->
86799
+
begin o#expression _x0 ;o#expression _x1 end
86800
+
|Bool ( _x0) ->
86801
+
begin o#bool _x0 end
86802
+
|Typeof ( _x0) ->
86803
+
begin o#expression _x0 end
86804
+
|Js_not ( _x0) ->
86805
+
begin o#expression _x0 end
86806
+
|Seq ( _x0,_x1) ->
86807
+
begin o#expression _x0 ;o#expression _x1 end
86808
+
|Cond ( _x0,_x1,_x2) ->
86809
+
begin o#expression _x0 ;o#expression _x1 ;o#expression _x2 end
86810
+
|Bin ( _x0,_x1,_x2) ->
86811
+
begin o#binop _x0 ;o#expression _x1 ;o#expression _x2 end
86812
+
|FlatCall ( _x0,_x1) ->
86813
+
begin o#expression _x0 ;o#expression _x1 end
86814
+
|Call ( _x0,_x1,_x2) ->
86815
+
begin o#expression _x0 ;o#list (fun o -> o#expression) _x1 ;o#unknown _x2 end
86816
+
|String_index ( _x0,_x1) ->
86817
+
begin o#expression _x0 ;o#expression _x1 end
86818
+
|Array_index ( _x0,_x1) ->
86819
+
begin o#expression _x0 ;o#expression _x1 end
86820
+
|Static_index ( _x0,_x1,_x2) ->
86821
+
begin o#expression _x0 ;o#string _x1 ;o#option (fun o -> o#int32) _x2 end
86822
+
|New ( _x0,_x1) ->
86823
+
begin o#expression _x0 ;o#option (fun o -> o#list (fun o -> o#expression)) _x1 end
86824
+
|Var ( _x0) ->
86825
+
begin o#vident _x0 end
86826
+
|Fun ( _x0,_x1,_x2,_x3) ->
86827
+
begin o#bool _x0 ;o#list (fun o -> o#ident) _x1 ;o#block _x2 ;o#unknown _x3 end
86828
+
|Str ( _x0,_x1) ->
86829
+
begin o#bool _x0 ;o#string _x1 end
86830
+
|Unicode ( _x0) ->
86831
+
begin o#string _x0 end
86832
+
|Raw_js_code ( _x0) ->
86833
+
begin o#unknown _x0 end
86834
+
|Array ( _x0,_x1) ->
86835
+
begin o#list (fun o -> o#expression) _x0 ;o#mutable_flag _x1 end
86836
+
|Optional_block ( _x0,_x1) ->
86837
+
begin o#expression _x0 ;o#bool _x1 end
86838
+
|Caml_block ( _x0,_x1,_x2,_x3) ->
86839
+
begin o#list (fun o -> o#expression) _x0 ;o#mutable_flag _x1 ;o#expression _x2 ;o#tag_info _x3 end
86840
+
|Caml_block_tag ( _x0) ->
86841
+
begin o#expression _x0 end
86842
+
|Number ( _x0) ->
86843
+
begin o#number _x0 end
86844
+
|Object ( _x0) ->
86845
+
begin o#property_map _x0 end
86846
+
|Undefined -> ()
86847
+
|Null -> ()
86848
+
method for_ident_expression : for_ident_expression -> unit = o#expression
86849
+
method finish_ident_expression : finish_ident_expression -> unit = o#expression
86850
+
method statement_desc : statement_desc -> unit = function
86851
+
| Block ( _x0) ->
86852
+
begin o#block _x0 end
86853
+
|Variable ( _x0) ->
86854
+
begin o#variable_declaration _x0 end
86855
+
|Exp ( _x0) ->
86856
+
begin o#expression _x0 end
86857
+
|If ( _x0,_x1,_x2) ->
86858
+
begin o#expression _x0 ;o#block _x1 ;o#block _x2 end
86859
+
|While ( _x0,_x1,_x2,_x3) ->
86860
+
begin o#option (fun o -> o#label) _x0 ;o#expression _x1 ;o#block _x2 ;o#unknown _x3 end
86861
+
|ForRange ( _x0,_x1,_x2,_x3,_x4,_x5) ->
86862
+
begin o#option (fun o -> o#for_ident_expression) _x0 ;o#finish_ident_expression _x1 ;o#for_ident _x2 ;o#for_direction _x3 ;o#block _x4 ;o#unknown _x5 end
86863
+
|Continue ( _x0) ->
86864
+
begin o#label _x0 end
86865
+
|Break -> ()
86866
+
|Return ( _x0) ->
86867
+
begin o#expression _x0 end
86868
+
|Int_switch ( _x0,_x1,_x2) ->
86869
+
begin o#expression _x0 ;o#list (fun o -> o#int_clause) _x1 ;o#option (fun o -> o#block) _x2 end
86870
+
|String_switch ( _x0,_x1,_x2) ->
86871
+
begin o#expression _x0 ;o#list (fun o -> o#string_clause) _x1 ;o#option (fun o -> o#block) _x2 end
86872
+
|Throw ( _x0) ->
86873
+
begin o#expression _x0 end
86874
+
|Try ( _x0,_x1,_x2) ->
86875
+
begin o#block _x0 ;o#option (fun o -> fun ( _x0,_x1) -> begin o#exception_ident _x0;o#block _x1 end) _x1 ;o#option (fun o -> o#block) _x2 end
86876
+
|Debugger -> ()
86877
+
method expression : expression -> unit = fun { expression_desc = _x0;comment = _x1} -> begin o#expression_desc _x0;o#option (fun o -> o#string) _x1 end
86878
+
method statement : statement -> unit = fun { statement_desc = _x0;comment = _x1} -> begin o#statement_desc _x0;o#option (fun o -> o#string) _x1 end
86879
+
method variable_declaration : variable_declaration -> unit = fun { ident = _x0;value = _x1;property = _x2;ident_info = _x3} -> begin o#ident _x0;o#option (fun o -> o#expression) _x1;o#property _x2;o#ident_info _x3 end
86880
+
method string_clause : string_clause -> unit = fun ( _x0,_x1) -> begin o#string _x0;o#case_clause _x1 end
86881
+
method int_clause : int_clause -> unit = fun ( _x0,_x1) -> begin o#int _x0;o#case_clause _x1 end
86882
+
method case_clause : case_clause -> unit = fun { switch_body = _x0;should_break = _x1;comment = _x2} -> begin o#block _x0;o#bool _x1;o#option (fun o -> o#string) _x2 end
86883
+
method block : block -> unit = o#list (fun o -> o#statement)
86884
+
method program : program -> unit = fun { block = _x0;exports = _x1;export_set = _x2} -> begin o#block _x0;o#exports _x1;o#unknown _x2 end
86885
+
method deps_program : deps_program -> unit = fun { program = _x0;modules = _x1;side_effect = _x2} -> begin o#program _x0;o#required_modules _x1;o#option (fun o -> o#string) _x2 end
0 commit comments