Mercurial Hosting > luan
comparison src/luan/CmdLine.java @ 31:5cf15507d77e
separate interpreter from interface
git-svn-id: https://luan-java.googlecode.com/svn/trunk@32 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 13 Dec 2012 02:50:04 +0000 |
parents | 8d8f4f5caef4 |
children | 0cdc1da466ee |
comparison
equal
deleted
inserted
replaced
30:8d8f4f5caef4 | 31:5cf15507d77e |
---|---|
2 | 2 |
3 import java.io.InputStreamReader; | 3 import java.io.InputStreamReader; |
4 import java.util.Arrays; | 4 import java.util.Arrays; |
5 import java.util.Scanner; | 5 import java.util.Scanner; |
6 import luan.lib.BasicLib; | 6 import luan.lib.BasicLib; |
7 import luan.interp.LuaCompiler; | |
7 | 8 |
8 | 9 |
9 public class CmdLine { | 10 public class CmdLine { |
10 static final String version = "Luan 0.0"; | 11 static final String version = "Luan 0.0"; |
11 | 12 |
12 public static void main(String[] args) throws Exception { | 13 public static void main(String[] args) throws Exception { |
13 LuaState lua = new LuaState(); | 14 LuaState lua = LuaCompiler.newLuaState(); |
14 BasicLib.register(lua); | 15 BasicLib.register(lua); |
15 boolean interactive = false; | 16 boolean interactive = false; |
16 boolean showVersion = false; | 17 boolean showVersion = false; |
17 int i = 0; | 18 int i = 0; |
18 if( args.length == 0 ) { | 19 if( args.length == 0 ) { |