123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114(* This file is used to control what we use from the current compiler and what is embed in
this library.
It must be opened in all modules, especially the ones coming from the compiler.
*)moduleJs=Versions.OCaml_412moduleOcaml=Versions.OCaml_currentmoduleSelect_ast(Ocaml:Versions.OCaml_version)=structincludeJsmoduleType=structtype('js,'ocaml)t=|Signature:(Js.Ast.Parsetree.signature,Ocaml.Ast.Parsetree.signature)t|Structure:(Js.Ast.Parsetree.structure,Ocaml.Ast.Parsetree.structure)t|Toplevel_phrase:(Js.Ast.Parsetree.toplevel_phrase,Ocaml.Ast.Parsetree.toplevel_phrase)t|Expression:(Js.Ast.Parsetree.expression,Ocaml.Ast.Parsetree.expression)t|Core_type:(Js.Ast.Parsetree.core_type,Ocaml.Ast.Parsetree.core_type)t|Type_declaration:(Js.Ast.Parsetree.type_declaration,Ocaml.Ast.Parsetree.type_declaration)t|Type_extension:(Js.Ast.Parsetree.type_extension,Ocaml.Ast.Parsetree.type_extension)t|Extension_constructor:(Js.Ast.Parsetree.extension_constructor,Ocaml.Ast.Parsetree.extension_constructor)t|List:('a,'b)t->('alist,'blist)t|Pair:('a,'b)t*('c,'d)t->('a*'c,'b*'d)tendopenTypemoduleOf_ocaml=Versions.Convert(Ocaml)(Js)moduleTo_ocaml=Versions.Convert(Js)(Ocaml)letrecof_ocaml:typeocamljs.(js,ocaml)Type.t->ocaml->js=letopenOf_ocamlinfunnode->matchnodewith|Signature->copy_signature|Structure->copy_structure|Toplevel_phrase->copy_toplevel_phrase|Expression->copy_expression|Core_type->copy_core_type|Type_declaration->copy_type_declaration|Type_extension->copy_type_extension|Extension_constructor->copy_extension_constructor|Listt->List.map(of_ocamlt)|Pair(a,b)->letf=of_ocamlainletg=of_ocamlbinfun(x,y)->(fx,gy)letrecto_ocaml:typeocamljs.(js,ocaml)Type.t->js->ocaml=letopenTo_ocamlinfunnode->matchnodewith|Signature->copy_signature|Structure->copy_structure|Toplevel_phrase->copy_toplevel_phrase|Expression->copy_expression|Core_type->copy_core_type|Type_declaration->copy_type_declaration|Type_extension->copy_type_extension|Extension_constructor->copy_extension_constructor|Listt->List.map(to_ocamlt)|Pair(a,b)->letf=to_ocamlainletg=to_ocamlbinfun(x,y)->(fx,gy)letof_ocaml_mapperitemfctxtx=to_ocamlitemx|>fctxt|>of_ocamlitemletto_ocaml_mapperitemfctxtx=of_ocamlitemx|>fctxt|>to_ocamlitemendmoduleSelected_ast=Select_ast(Ocaml)moduleAst_helper=Ast_helper_lite(* Modules from Ast_<n> of Astlib, where <n> is the compiler version the ppxlib driver is compiled with *)moduleParsetree=Selected_ast.Ast.ParsetreemoduleAsttypes=Selected_ast.Ast.Asttypes(* Other Astlib modules *)moduleLocation=Astlib.LocationmoduleLongident=Astlib.LongidentmoduleParse=structincludeAstlib.ParsemoduleOf_ocaml=Versions.Convert(Ocaml)(Js)letimplementationlexbuf=implementationlexbuf|>Of_ocaml.copy_structureletinterfacelexbuf=interfacelexbuf|>Of_ocaml.copy_signaturelettoplevel_phraselexbuf=toplevel_phraselexbuf|>Of_ocaml.copy_toplevel_phraseletuse_filelexbuf=use_filelexbuf|>List.mapOf_ocaml.copy_toplevel_phraseletcore_typelexbuf=core_typelexbuf|>Of_ocaml.copy_core_typeletexpressionlexbuf=expressionlexbuf|>Of_ocaml.copy_expressionletpatternlexbuf=patternlexbuf|>Of_ocaml.copy_patternend