Switched back to plain strings for some compiler options.

To be consistent or to be convenient, that is the question.
master
Adrien Guatto 14 years ago
parent 381e4e84f7
commit 6ff8ed993f

@ -77,13 +77,13 @@ let main () =
"-where", Arg.Unit locate_stdlib, doc_locate_stdlib;
"-stdlib", Arg.String set_stdlib, doc_stdlib;
"-c", Arg.Set create_object_file, doc_object_file;
"-s", read_qualname set_simulation_node, doc_sim;
"-s", Arg.String set_simulation_node, doc_sim;
"-tomato", Arg.Set tomato, doc_tomato;
"-tomanode", read_qualname add_tomato_node, doc_tomato;
"-tomacheck", read_qualname add_tomato_check, "";
"-inline", read_qualname add_inlined_node, doc_inline;
"-flatten", Arg.Set flatten, doc_flatten;
"-assert", read_qualname add_assert, doc_assert;
"-assert", Arg.String add_assert, doc_assert;
"-nopervasives", Arg.Unit set_no_pervasives, doc_no_pervasives;
"-target", Arg.String add_target_language, doc_target;
"-targetpath", Arg.String set_target_path, doc_target_path;

@ -55,7 +55,7 @@ let add_check prefix pass nd nd_list =
node_params = [];
node_params_constraints = [] };
Compiler_options.add_assert nd_check.n_name;
Compiler_options.add_assert nd_check.n_name.name;
nd :: nd' :: nd_check :: nd_list
let add_checks pass prefix nnl p =

@ -257,10 +257,10 @@ let mk_main name p =
match (!Compiler_options.simulation_node, !Compiler_options.assert_nodes) with
| (None, []) -> []
| (_, n_names) ->
let find_class qn =
try List.find (fun cd -> cd.cd_name = qn) p.p_defs
let find_class n =
try List.find (fun cd -> cd.cd_name.name = n) p.p_defs
with Not_found ->
Format.eprintf "Unknown node %a.@." Global_printer.print_qualname qn;
Format.eprintf "Unknown node %s.@." n;
exit 1 in
let a_classes = List.map find_class n_names in

@ -50,11 +50,11 @@ let show_version () =
let verbose = ref false
let print_types = ref false
let assert_nodes : qualname list ref = ref []
let assert_nodes : name list ref = ref []
let add_assert nd = assert_nodes := nd :: !assert_nodes
let simulation = ref false
let simulation_node : qualname option ref = ref None
let simulation_node : name option ref = ref None
let set_simulation_node s =
simulation := true;
simulation_node := Some s

Loading…
Cancel
Save