Mercurial Hosting > luan
comparison core/src/luan/cmd_line.luan @ 260:f1f7d8c7e94e
add Io.protocols
git-svn-id: https://luan-java.googlecode.com/svn/trunk@261 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Tue, 28 Oct 2014 23:25:13 +0000 |
parents | 705d14f4d8ee |
children | 9e0d4452e649 |
comparison
equal
deleted
inserted
replaced
259:f9b201530b85 | 260:f1f7d8c7e94e |
---|---|
65 _G.arg = {} | 65 _G.arg = {} |
66 for j,v in ipairs(args) do | 66 for j,v in ipairs(args) do |
67 _G.arg[j-i] = v | 67 _G.arg[j-i] = v |
68 end | 68 end |
69 try | 69 try |
70 local main_file = load_file(file) | 70 local main_file = load_file("file:"..file) |
71 main_file( Table.unpack(_G.arg) ) | 71 main_file( Table.unpack(_G.arg) ) |
72 catch e do | 72 catch e do |
73 Io.print_to(Io.stderr, e ) | 73 Io.print_to(Io.stderr, e ) |
74 end | 74 end |
75 end | 75 end |