@@ -182,13 +182,21 @@ let dgfip_options =
182182 " Specify DGFiP options (use --dgfip_options=--help to display DGFiP \
183183 specific options)" )
184184
185+ let no_local_vars =
186+ Arg. (
187+ value & flag
188+ & info [ " no-local-vars" ]
189+ ~doc:
190+ " (experimental) Does not generate local vars for definitions and \
191+ evaluation." )
192+
185193let mlang_t f =
186194 Term. (
187195 const f $ files $ applications $ without_dgfip_m $ debug $ var_info_debug
188196 $ display_time $ dep_graph_file $ no_print_cycles $ backend $ output
189197 $ run_all_tests $ dgfip_test_filter $ run_test $ mpp_function
190198 $ optimize_unsafe_float $ precision $ roundops $ comparison_error_margin_cli
191- $ income_year_cli $ m_clean_calls $ dgfip_options)
199+ $ income_year_cli $ m_clean_calls $ dgfip_options $ no_local_vars )
192200
193201let info =
194202 let doc =
@@ -296,6 +304,8 @@ let dgfip_flags = ref Dgfip_options.default_flags
296304
297305let execution_mode = ref Extraction
298306
307+ let no_local_var = ref false
308+
299309(* Default value for the epsilon slack when comparing things in the
300310 interpreter *)
301311let comparison_error_margin = ref 0.000001
@@ -310,7 +320,7 @@ let set_all_arg_refs (files_ : files) applications_ (without_dgfip_m_ : bool)
310320 (income_year_ : int option ) (value_sort_ : value_sort )
311321 (round_ops_ : round_ops ) (backend_ : backend ) (dgfip_test_filter_ : bool )
312322 (mpp_function_ : string ) (dgfip_flags_ : Dgfip_options.flags )
313- (execution_mode_ : execution_mode ) =
323+ (execution_mode_ : execution_mode ) ( no_local_var_ : bool ) =
314324 source_files := files_;
315325 application_names := applications_;
316326 without_dgfip_m := without_dgfip_m_;
@@ -333,6 +343,7 @@ let set_all_arg_refs (files_ : files) applications_ (without_dgfip_m_ : bool)
333343 dgfip_test_filter := dgfip_test_filter_;
334344 mpp_function := mpp_function_;
335345 dgfip_flags := dgfip_flags_;
346+ no_local_var := no_local_var_;
336347 match output_file_ with
337348 | None -> ()
338349 | Some o -> (
0 commit comments