comparison src/luan/Luan.java @ 1242:ce3279ef1bd9

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 25 Jun 2018 19:34:52 -0600
parents 7ef40e1923b7
children e8020216dee7
comparison
equal deleted inserted replaced
1241:2b5046cd7963 1242:ce3279ef1bd9
13 13
14 14
15 public final class Luan { 15 public final class Luan {
16 16
17 public static void main(String[] args) throws LuanException { 17 public static void main(String[] args) throws LuanException {
18 doFile( "classpath:luan/cmd_line.luan", args );
19 }
20
21 public static void doFile(String uri,String... args) throws LuanException {
18 LuanState luan = new LuanState(); 22 LuanState luan = new LuanState();
19 LuanFunction standalone = (LuanFunction)BasicLuan.load_file(luan,"classpath:luan/cmd_line.luan"); 23 LuanFunction fn = (LuanFunction)BasicLuan.load_file(luan,uri);
20 standalone.call(luan,args); 24 fn.call(luan,args);
21 } 25 }
22 26
23 public static Object first(Object obj) { 27 public static Object first(Object obj) {
24 if( !(obj instanceof Object[]) ) 28 if( !(obj instanceof Object[]) )
25 return obj; 29 return obj;