comparison core/src/luan/Luan.java @ 481:5d4a78c93383

luan errors are now tables
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 11 May 2015 20:26:36 -0600
parents bbad2d06f728
children 0dfc01d8d42d
comparison
equal deleted inserted replaced
480:44caaa6a3d92 481:5d4a78c93383
4 import luan.modules.BasicLuan; 4 import luan.modules.BasicLuan;
5 5
6 6
7 public final class Luan { 7 public final class Luan {
8 8
9 public static void main(String[] args) { 9 public static void main(String[] args) throws LuanException {
10 LuanState luan = LuanState.newInstance(); 10 LuanState luan = LuanState.newInstance();
11 try { 11 LuanFunction standalone = (LuanFunction)BasicLuan.load_file(luan,"classpath:luan/cmd_line.luan",null);
12 LuanFunction standalone = (LuanFunction)BasicLuan.load_file(luan,"classpath:luan/cmd_line.luan",null); 12 luan.call(standalone,args);
13 luan.call(standalone,args);
14 } catch(LuanException e) {
15 System.err.println(e.getFullMessage());
16 // e.printStackTrace();
17 System.exit(-1);
18 }
19 } 13 }
20 14
21 public static Object first(Object obj) { 15 public static Object first(Object obj) {
22 if( !(obj instanceof Object[]) ) 16 if( !(obj instanceof Object[]) )
23 return obj; 17 return obj;