Mercurial Hosting > luan
comparison core/src/luan/cmd_line.luan @ 323:cd2924a1052c
improve testing
git-svn-id: https://luan-java.googlecode.com/svn/trunk@324 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Mon, 09 Feb 2015 04:33:21 +0000 |
parents | f8ece87df2b1 |
children | db37d6aee4db |
comparison
equal
deleted
inserted
replaced
322:f8ece87df2b1 | 323:cd2924a1052c |
---|---|
66 end | 66 end |
67 end | 67 end |
68 if showVersion then print(Luan.VERSION) end | 68 if showVersion then print(Luan.VERSION) end |
69 if i <= #args then | 69 if i <= #args then |
70 local file = args[i] | 70 local file = args[i] |
71 local arg = {} | 71 Luan.arg = {} |
72 for j,v in ipairs(args) do | 72 for j,v in ipairs(args) do |
73 arg[j-i] = v | 73 Luan.arg[j-i] = v |
74 end | 74 end |
75 try | 75 try |
76 local main_file = load_file("file:"..file) | 76 local main_file = load_file("file:"..file) |
77 main_file( Table.unpack(arg) ) | 77 main_file( Table.unpack(Luan.arg) ) |
78 catch e do | 78 catch e do |
79 Io.print_to(Io.stderr, e ) | 79 Io.print_to(Io.stderr, e ) |
80 end | 80 end |
81 end | 81 end |
82 if interactive then | 82 if interactive then |