comparison src/luan/cmd_line.luan @ 1685:46cf5137cb6b

misc fixes
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 08 Jun 2022 20:13:54 -0600
parents d9a5405a3102
children bac27b119ff2
comparison
equal deleted inserted replaced
1684:cfbecf7af56f 1685:46cf5137cb6b
13 if #args == 0 then 13 if #args == 0 then
14 print("Luan "..Luan.VERSION) 14 print("Luan "..Luan.VERSION)
15 Io.debug("> ") 15 Io.debug("> ")
16 else 16 else
17 local file = args[1] 17 local file = args[1]
18 Luan.arg = {}
19 for j,v in ipairs(args) do
20 Luan.arg[j-1] = v
21 end
22 try 18 try
23 local main_file = load_file(file) or error("file '"..file.."' not found") 19 local main_file = load_file(file) or error("file '"..file.."' not found")
24 local rtn = pack( main_file( unpack(Luan.arg) ) ) 20 local rtn = pack( main_file( unpack(Luan.arg) ) )
25 if rtn.n > 0 then 21 if rtn.n > 0 then
26 print( unpack(rtn) ) 22 print( unpack(rtn) )