Mercurial Hosting > luan
comparison src/luan/Luan.java @ 134:b585d0915621
remove CmdLine.java and move code to Luan.java
git-svn-id: https://luan-java.googlecode.com/svn/trunk@135 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Wed, 11 Jun 2014 05:24:11 +0000 |
parents | 8c706d6eb5dc |
children | 3119326260ea |
comparison
equal
deleted
inserted
replaced
133:98aba462c422 | 134:b585d0915621 |
---|---|
1 package luan; | 1 package luan; |
2 | |
3 import luan.lib.BasicLib; | |
2 | 4 |
3 | 5 |
4 public final class Luan { | 6 public final class Luan { |
5 public static final String version = "Luan 0.1"; | 7 public static final String version = "Luan 0.1"; |
8 | |
9 public static void main(String[] args) { | |
10 LuanState luan = LuanState.newStandard(); | |
11 try { | |
12 LuanFunction standalone = (LuanFunction)BasicLib.load_java_resource(luan,"luan/tools/cmd_line.luan"); | |
13 luan.call(standalone,args); | |
14 } catch(LuanException e) { | |
15 // System.err.println(e.getMessage()); | |
16 e.printStackTrace(); | |
17 System.exit(-1); | |
18 } | |
19 } | |
6 | 20 |
7 public static Object first(Object obj) { | 21 public static Object first(Object obj) { |
8 if( !(obj instanceof Object[]) ) | 22 if( !(obj instanceof Object[]) ) |
9 return obj; | 23 return obj; |
10 Object[] a = (Object[])obj; | 24 Object[] a = (Object[])obj; |