1234567891011121314151617181920212223242526272829303132333435363738394041openCommon(*****************************************************************************)(* Simple AST *)(*****************************************************************************)lettest_parse_simplexs=letfullxs=Lib_parsing_js.find_source_files_of_dir_or_filesxsinfullxs+>List.iter(funfile->tryletcst=Parse_js.parse_programfileinlet_ast=Ast_js_build.programcstin()withexn->(matchexnwith|Ast_js_build.TodoConstruct(s,tok)|Ast_js_build.UnhandledConstruct(s,tok)->pr2s;pr2(Parse_info.error_message_infotok);|_->raiseexn))lettest_dump_astfile=letcst=Parse_js.parse_programfileinletast=Ast_js_build.programcstinletv=Meta_ast_js.vof_programastinlets=Ocaml.string_of_vvinprs(*****************************************************************************)(* Main entry for Arg *)(*****************************************************************************)letactions()=["-parse_js_simple"," <files or dirs>",Common.mk_action_n_argtest_parse_simple;"-dump_ast_js"," <file>",Common.mk_action_1_argtest_dump_ast;]