@@ -190,13 +190,22 @@ let dgfip_options =
190190 " Specify DGFiP options (use --dgfip_options=--help to display DGFiP \
191191 specific options)" )
192192
193+ let no_local_vars =
194+ Arg. (
195+ value & flag
196+ & info [ " no-local-vars" ]
197+ ~doc:
198+ " (experimental) Does not generate local vars for definitions and \
199+ evaluation." )
200+
193201let mlang_t f =
194202 Term. (
195203 const f $ files $ applications $ without_dgfip_m $ debug $ var_info_debug
196204 $ display_time $ dep_graph_file $ no_print_cycles $ backend $ output
197205 $ run_all_tests $ dgfip_test_filter $ run_test $ mpp_function
198206 $ optimize_unsafe_float $ precision $ roundops $ comparison_error_margin_cli
199- $ income_year_cli $ m_clean_calls $ lazy_c_gen $ dgfip_options)
207+ $ income_year_cli $ m_clean_calls $ lazy_c_gen $ dgfip_options
208+ $ no_local_vars)
200209
201210let info =
202211 let doc =
@@ -306,6 +315,8 @@ let dgfip_flags = ref Dgfip_options.default_flags
306315
307316let execution_mode = ref Extraction
308317
318+ let no_local_var = ref false
319+
309320(* Default value for the epsilon slack when comparing things in the
310321 interpreter *)
311322let comparison_error_margin = ref 0.000001
@@ -320,7 +331,8 @@ let set_all_arg_refs (files_ : files) applications_ (without_dgfip_m_ : bool)
320331 (income_year_ : int option ) (value_sort_ : value_sort )
321332 (round_ops_ : round_ops ) (backend_ : backend ) (dgfip_test_filter_ : bool )
322333 (mpp_function_ : string ) (lazy_c_generation_ : bool )
323- (dgfip_flags_ : Dgfip_options.flags ) (execution_mode_ : execution_mode ) =
334+ (dgfip_flags_ : Dgfip_options.flags ) (execution_mode_ : execution_mode )
335+ (no_local_var_ : bool ) =
324336 source_files := files_;
325337 application_names := applications_;
326338 without_dgfip_m := without_dgfip_m_;
@@ -344,6 +356,7 @@ let set_all_arg_refs (files_ : files) applications_ (without_dgfip_m_ : bool)
344356 mpp_function := mpp_function_;
345357 lazy_c_generation := lazy_c_generation_;
346358 dgfip_flags := dgfip_flags_;
359+ no_local_var := no_local_var_;
347360 match output_file_ with
348361 | None -> ()
349362 | Some o -> (
0 commit comments