changeset 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 98aba462c422
children 3119326260ea
files src/luan/Luan.java src/luan/tools/CmdLine.java
diffstat 2 files changed, 14 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
diff -r 98aba462c422 -r b585d0915621 src/luan/Luan.java
--- a/src/luan/Luan.java	Wed Jun 11 05:20:19 2014 +0000
+++ b/src/luan/Luan.java	Wed Jun 11 05:24:11 2014 +0000
@@ -1,9 +1,23 @@
 package luan;
 
+import luan.lib.BasicLib;
+
 
 public final class Luan {
 	public static final String version = "Luan 0.1";
 
+	public static void main(String[] args) {
+		LuanState luan = LuanState.newStandard();
+		try {
+			LuanFunction standalone = (LuanFunction)BasicLib.load_java_resource(luan,"luan/tools/cmd_line.luan");
+			luan.call(standalone,args);
+		} catch(LuanException e) {
+//			System.err.println(e.getMessage());
+			e.printStackTrace();
+			System.exit(-1);
+		}
+	}
+
 	public static Object first(Object obj) {
 		if( !(obj instanceof Object[]) )
 			return obj;
diff -r 98aba462c422 -r b585d0915621 src/luan/tools/CmdLine.java
--- a/src/luan/tools/CmdLine.java	Wed Jun 11 05:20:19 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-package luan.tools;
-
-import java.io.Console;
-import java.io.IOException;
-import luan.lib.BasicLib;
-import luan.Luan;
-import luan.LuanState;
-import luan.LuanFunction;
-import luan.LuanTable;
-import luan.LuanException;
-
-
-public class CmdLine {
-
-	public static void main(String[] args) {
-		LuanState luan = LuanState.newStandard();
-		try {
-			LuanFunction standalone = (LuanFunction)BasicLib.load_java_resource(luan,"luan/tools/cmd_line.luan");
-			luan.call(standalone,args);
-		} catch(LuanException e) {
-//			System.err.println(e.getMessage());
-			e.printStackTrace();
-			System.exit(-1);
-		}
-	}
-
-}