comparison core/src/luan/cmd_line.luan @ 201:27abb3746917

minir git-svn-id: https://luan-java.googlecode.com/svn/trunk@202 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Thu, 03 Jul 2014 22:42:44 +0000
parents cf939124461a
children 705d14f4d8ee
comparison
equal deleted inserted replaced
200:9fb218211763 201:27abb3746917
63 local file = args[i] 63 local file = args[i]
64 _G.arg = {} 64 _G.arg = {}
65 for j,v in ipairs(args) do 65 for j,v in ipairs(args) do
66 _G.arg[j-i] = v 66 _G.arg[j-i] = v
67 end 67 end
68 local main_file = load_file(file) 68 try
69 main_file( Table.unpack(_G.arg) ) 69 local main_file = load_file(file)
70 main_file( Table.unpack(_G.arg) )
71 catch e do
72 print(e)
73 end
70 end 74 end
71 if interactive then 75 if interactive then
72 Debug.debug("> ") 76 Debug.debug("> ")
73 end 77 end