123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566(*s: flag_parsing_php.ml *)(*x: flag_parsing_php.ml *)(*x: flag_parsing_php.ml *)(*x: flag_parsing_php.ml *)(*x: flag_parsing_php.ml *)letstrict_lexer=reffalse(* todo: not that useful, probably can remove *)letshow_parsing_error_full=reftrue(*x: flag_parsing_php.ml *)letshort_open_tag=reftrue(*x: flag_parsing_php.ml *)(* PHP is case insensitive, which is I think a bad idea, so
* by default let's have a case sensitive lexer.
*)letcase_sensitive=reftrue(* e.g. yield *)letfacebook_lang_extensions=reftrue(* in facebook context, we want xhp support by default *)letxhp_builtin=reftrueletverbose_pp=reffalse(* Alternative way to get xhp by calling xhpize as a preprocessor.
* Slower than builtin_xhp and have some issues where the comments
* are removed, unless you use the experimental_merge_tokens_xhp
* but which has some issues itself.
*)letpp_default=ref(None:stringoption)letxhp_command="xhpize"letobsolete_merge_tokens_xhp=reffalse(*s: flag_parsing_php.ml pp related flags *)letcaching_parsing=reffalseopenCommon(* coupling: copy paste of Php_vs_php *)letis_metavar_names=s=~"[A-Z]\\([0-9]?_[A-Z]*\\)?"letcmdline_flags_pp()=["-pp",Arg.String(funs->pp_default:=Somes)," <cmd> optional preprocessor (e.g. xhpize)";"-verbose_pp",Arg.Setverbose_pp," ";(*s: other cmdline_flags_pp *)"-xhp",Arg.Setxhp_builtin," parsing XHP constructs (default)";"-xhp_with_xhpize",Arg.Unit(fun()->xhp_builtin:=false;pp_default:=Somexhp_command)," parsing XHP using xhpize as a preprocessor";"-no_xhp",Arg.Clearxhp_builtin," ";"-no_fb_ext",Arg.Clearfacebook_lang_extensions," ";(*e: other cmdline_flags_pp *)](*e: flag_parsing_php.ml pp related flags *)(*e: flag_parsing_php.ml *)