From 94740a9b414a0fd9af70acb9b8bf3b9576b537e1 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 18 Dec 2018 19:23:20 -0800 Subject: Improved command line interface and robustness of tools. --- nomsu.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nomsu.lua') diff --git a/nomsu.lua b/nomsu.lua index 1b5a73e..266a4a4 100644 --- a/nomsu.lua +++ b/nomsu.lua @@ -108,7 +108,7 @@ local parser = re.compile([[ args <- {| (flag %sep)* / "-m" %sep (!("--" %sep) {[^%sep]+} %sep)* ("--" %sep)? / {[^%sep]+} %sep / {~ '' %sep? -> 'nomsu://tools/repl.nom' ~}) |} :}) - {:nomsu_args: {| (nomsu_flag %sep)* {:extra_args: {| ({[^%sep]+} %sep)* |} :} |} :} + {:nomsu_args: {| (nomsu_flag %sep)* {:extras: {| ({[^%sep]+} %sep)* |} :} |} :} |} !. flag <- {:optimization: "-O" (%sep? %number)? :} @@ -138,8 +138,8 @@ for _index_0 = 1, #_list_0 do local argpair = _list_0[_index_0] nomsu_args[argpair.key] = argpair.value end -nomsu_args.extra_args = List(args.nomsu_args.extra_args or { }) -nomsu_environment.command_line_args = nomsu_args +nomsu_args.extras = List(args.nomsu_args.extras or { }) +nomsu_environment.COMMAND_LINE_ARGS = nomsu_args nomsu_environment.OPTIMIZATION = tonumber(args.optimization or 1) local run run = function() -- cgit v1.2.3