unsafe fn parser_options_from_ocaml_only_for_parser_errors(
    ocaml_opts: UnsafeOcamlPtr,
) -> (ParserOptions, (bool, bool, bool)) {
    let ocaml_opts = ocaml_opts.as_usize() as *const usize;

    let hhvm_compat_mode = bool::from_ocaml(*ocaml_opts.add(0)).unwrap();
    let hhi_mode = bool::from_ocaml(*ocaml_opts.add(1)).unwrap();
    let codegen = bool::from_ocaml(*ocaml_opts.add(2)).unwrap();

    let mut parser_options = ParserOptions::default();

    let po_disable_lval_as_an_expression = bool::from_ocaml(*ocaml_opts.add(3)).unwrap();
    let po_disable_legacy_soft_typehints = bool::from_ocaml(*ocaml_opts.add(4)).unwrap();
    let tco_const_static_props = bool::from_ocaml(*ocaml_opts.add(5)).unwrap();
    let po_disable_legacy_attribute_syntax = bool::from_ocaml(*ocaml_opts.add(6)).unwrap();
    let po_const_default_func_args = bool::from_ocaml(*ocaml_opts.add(7)).unwrap();
    let po_abstract_static_props = bool::from_ocaml(*ocaml_opts.add(8)).unwrap();
    let po_disallow_func_ptrs_in_constants = bool::from_ocaml(*ocaml_opts.add(9)).unwrap();
    let po_enable_xhp_class_modifier = bool::from_ocaml(*ocaml_opts.add(10)).unwrap();
    let po_disable_xhp_element_mangling = bool::from_ocaml(*ocaml_opts.add(11)).unwrap();
    let po_disable_xhp_children_declarations = bool::from_ocaml(*ocaml_opts.add(12)).unwrap();
    let po_enable_first_class_function_pointers = bool::from_ocaml(*ocaml_opts.add(13)).unwrap();
    let po_enable_enum_classes = bool::from_ocaml(*ocaml_opts.add(14)).unwrap();
    let po_disable_modes = bool::from_ocaml(*ocaml_opts.add(15)).unwrap();
    let po_disable_array = bool::from_ocaml(*ocaml_opts.add(16)).unwrap();
    let po_const_default_lambda_args = bool::from_ocaml(*ocaml_opts.add(17)).unwrap();
    let po_disable_array_typehint = bool::from_ocaml(*ocaml_opts.add(18)).unwrap();
    let po_allow_unstable_features = bool::from_ocaml(*ocaml_opts.add(19)).unwrap();

    parser_options.po_disable_lval_as_an_expression = po_disable_lval_as_an_expression;
    parser_options.po_disable_legacy_soft_typehints = po_disable_legacy_soft_typehints;
    parser_options.tco_const_static_props = tco_const_static_props;
    parser_options.po_disable_legacy_attribute_syntax = po_disable_legacy_attribute_syntax;
    parser_options.po_const_default_func_args = po_const_default_func_args;
    parser_options.po_const_default_lambda_args = po_const_default_lambda_args;
    parser_options.po_abstract_static_props = po_abstract_static_props;
    parser_options.po_disallow_func_ptrs_in_constants = po_disallow_func_ptrs_in_constants;
    parser_options.po_enable_xhp_class_modifier = po_enable_xhp_class_modifier;
    parser_options.po_disable_xhp_element_mangling = po_disable_xhp_element_mangling;
    parser_options.po_disable_xhp_children_declarations = po_disable_xhp_children_declarations;
    parser_options.po_enable_first_class_function_pointers =
        po_enable_first_class_function_pointers;
    parser_options.po_enable_enum_classes = po_enable_enum_classes;
    parser_options.po_disable_modes = po_disable_modes;
    parser_options.po_disable_array = po_disable_array;
    parser_options.po_disable_array_typehint = po_disable_array_typehint;
    parser_options.po_allow_unstable_features = po_allow_unstable_features;

    (parser_options, (hhvm_compat_mode, hhi_mode, codegen))
}
// "only_for_parser_errors" because it sets only a subset of options relevant to parser errors,
// leaving the rest default
"only_for_parser_errors" because it sets only a subset of options relevant to parser errors,
leaving the rest default
" only_for_parser_errors " because it sets only a subset of options relevant to parser errors leaving the rest default
unsafe fn parser_options_from_ocaml_only_for_parser_errors(
    ocaml_opts: UnsafeOcamlPtr,
) -> (ParserOptions, (bool, bool, bool)) {
    let ocaml_opts = ocaml_opts.as_usize() as *const usize;
    let hhvm_compat_mode = bool::from_ocaml(*ocaml_opts.add(0)).unwrap();
    let hhi_mode = bool::from_ocaml(*ocaml_opts.add(1)).unwrap();
    let codegen = bool::from_ocaml(*ocaml_opts.add(2)).unwrap();
    let mut parser_options = ParserOptions::default();
    let po_disable_lval_as_an_expression = bool::from_ocaml(*ocaml_opts.add(3)).unwrap();
    let po_disable_legacy_soft_typehints = bool::from_ocaml(*ocaml_opts.add(4)).unwrap();
    let tco_const_static_props = bool::from_ocaml(*ocaml_opts.add(5)).unwrap();
    let po_disable_legacy_attribute_syntax = bool::from_ocaml(*ocaml_opts.add(6)).unwrap();
    let po_const_default_func_args = bool::from_ocaml(*ocaml_opts.add(7)).unwrap();
    let po_abstract_static_props = bool::from_ocaml(*ocaml_opts.add(8)).unwrap();
    let po_disallow_func_ptrs_in_constants = bool::from_ocaml(*ocaml_opts.add(9)).unwrap();
    let po_enable_xhp_class_modifier = bool::from_ocaml(*ocaml_opts.add(10)).unwrap();
    let po_disable_xhp_element_mangling = bool::from_ocaml(*ocaml_opts.add(11)).unwrap();
    let po_disable_xhp_children_declarations = bool::from_ocaml(*ocaml_opts.add(12)).unwrap();
    let po_enable_first_class_function_pointers = bool::from_ocaml(*ocaml_opts.add(13)).unwrap();
    let po_enable_enum_classes = bool::from_ocaml(*ocaml_opts.add(14)).unwrap();
    let po_disable_modes = bool::from_ocaml(*ocaml_opts.add(15)).unwrap();
    let po_disable_array = bool::from_ocaml(*ocaml_opts.add(16)).unwrap();
    let po_const_default_lambda_args = bool::from_ocaml(*ocaml_opts.add(17)).unwrap();
    let po_disable_array_typehint = bool::from_ocaml(*ocaml_opts.add(18)).unwrap();
    let po_allow_unstable_features = bool::from_ocaml(*ocaml_opts.add(19)).unwrap();
    parser_options.po_disable_lval_as_an_expression = po_disable_lval_as_an_expression;
    parser_options.po_disable_legacy_soft_typehints = po_disable_legacy_soft_typehints;
    parser_options.tco_const_static_props = tco_const_static_props;
    parser_options.po_disable_legacy_attribute_syntax = po_disable_legacy_attribute_syntax;
    parser_options.po_const_default_func_args = po_const_default_func_args;
    parser_options.po_const_default_lambda_args = po_const_default_lambda_args;
    parser_options.po_abstract_static_props = po_abstract_static_props;
    parser_options.po_disallow_func_ptrs_in_constants = po_disallow_func_ptrs_in_constants;
    parser_options.po_enable_xhp_class_modifier = po_enable_xhp_class_modifier;
    parser_options.po_disable_xhp_element_mangling = po_disable_xhp_element_mangling;
    parser_options.po_disable_xhp_children_declarations = po_disable_xhp_children_declarations;
    parser_options.po_enable_first_class_function_pointers =
        po_enable_first_class_function_pointers;
    parser_options.po_enable_enum_classes = po_enable_enum_classes;
    parser_options.po_disable_modes = po_disable_modes;
    parser_options.po_disable_array = po_disable_array;
    parser_options.po_disable_array_typehint = po_disable_array_typehint;
    parser_options.po_allow_unstable_features = po_allow_unstable_features;
    (parser_options, (hhvm_compat_mode, hhi_mode, codegen))
}
unsafe fn parser_options_from_ocaml_only_for_parser_errors ( ocaml_opts : UnsafeOcamlPtr , ) -> ( ParserOptions , ( bool , bool , bool ) ) { let ocaml_opts = ocaml_opts . as_usize ( ) as * const usize ; let hhvm_compat_mode = bool :: from_ocaml ( * ocaml_opts . add ( 0 ) ) . unwrap ( ) ; let hhi_mode = bool :: from_ocaml ( * ocaml_opts . add ( 1 ) ) . unwrap ( ) ; let codegen = bool :: from_ocaml ( * ocaml_opts . add ( 2 ) ) . unwrap ( ) ; let mut parser_options = ParserOptions :: default ( ) ; let po_disable_lval_as_an_expression = bool :: from_ocaml ( * ocaml_opts . add ( 3 ) ) . unwrap ( ) ; let po_disable_legacy_soft_typehints = bool :: from_ocaml ( * ocaml_opts . add ( 4 ) ) . unwrap ( ) ; let tco_const_static_props = bool :: from_ocaml ( * ocaml_opts . add ( 5 ) ) . unwrap ( ) ; let po_disable_legacy_attribute_syntax = bool :: from_ocaml ( * ocaml_opts . add ( 6 ) ) . unwrap ( ) ; let po_const_default_func_args = bool :: from_ocaml ( * ocaml_opts . add ( 7 ) ) . unwrap ( ) ; let po_abstract_static_props = bool :: from_ocaml ( * ocaml_opts . add ( 8 ) ) . unwrap ( ) ; let po_disallow_func_ptrs_in_constants = bool :: from_ocaml ( * ocaml_opts . add ( 9 ) ) . unwrap ( ) ; let po_enable_xhp_class_modifier = bool :: from_ocaml ( * ocaml_opts . add ( 10 ) ) . unwrap ( ) ; let po_disable_xhp_element_mangling = bool :: from_ocaml ( * ocaml_opts . add ( 11 ) ) . unwrap ( ) ; let po_disable_xhp_children_declarations = bool :: from_ocaml ( * ocaml_opts . add ( 12 ) ) . unwrap ( ) ; let po_enable_first_class_function_pointers = bool :: from_ocaml ( * ocaml_opts . add ( 13 ) ) . unwrap ( ) ; let po_enable_enum_classes = bool :: from_ocaml ( * ocaml_opts . add ( 14 ) ) . unwrap ( ) ; let po_disable_modes = bool :: from_ocaml ( * ocaml_opts . add ( 15 ) ) . unwrap ( ) ; let po_disable_array = bool :: from_ocaml ( * ocaml_opts . add ( 16 ) ) . unwrap ( ) ; let po_const_default_lambda_args = bool :: from_ocaml ( * ocaml_opts . add ( 17 ) ) . unwrap ( ) ; let po_disable_array_typehint = bool :: from_ocaml ( * ocaml_opts . add ( 18 ) ) . unwrap ( ) ; let po_allow_unstable_features = bool :: from_ocaml ( * ocaml_opts . add ( 19 ) ) . unwrap ( ) ; parser_options . po_disable_lval_as_an_expression = po_disable_lval_as_an_expression ; parser_options . po_disable_legacy_soft_typehints = po_disable_legacy_soft_typehints ; parser_options . tco_const_static_props = tco_const_static_props ; parser_options . po_disable_legacy_attribute_syntax = po_disable_legacy_attribute_syntax ; parser_options . po_const_default_func_args = po_const_default_func_args ; parser_options . po_const_default_lambda_args = po_const_default_lambda_args ; parser_options . po_abstract_static_props = po_abstract_static_props ; parser_options . po_disallow_func_ptrs_in_constants = po_disallow_func_ptrs_in_constants ; parser_options . po_enable_xhp_class_modifier = po_enable_xhp_class_modifier ; parser_options . po_disable_xhp_element_mangling = po_disable_xhp_element_mangling ; parser_options . po_disable_xhp_children_declarations = po_disable_xhp_children_declarations ; parser_options . po_enable_first_class_function_pointers = po_enable_first_class_function_pointers ; parser_options . po_enable_enum_classes = po_enable_enum_classes ; parser_options . po_disable_modes = po_disable_modes ; parser_options . po_disable_array = po_disable_array ; parser_options . po_disable_array_typehint = po_disable_array_typehint ; parser_options . po_allow_unstable_features = po_allow_unstable_features ; ( parser_options , ( hhvm_compat_mode , hhi_mode , codegen ) ) }
"only_for_parser_errors" because it sets only a subset of options relevant to parser errors,
leaving the rest default
" only_for_parser_errors " because it sets only a subset of options relevant to parser errors leaving the rest default
ocaml_opts
UnsafeOcamlPtr