Mercurial Hosting > luan
comparison src/luan/CmdLine.java @ 37:8a57ebfdfd78
add JavaLib
git-svn-id: https://luan-java.googlecode.com/svn/trunk@38 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 20 Dec 2012 02:36:07 +0000 |
parents | 2a35154aec14 |
children |
comparison
equal
deleted
inserted
replaced
36:2a35154aec14 | 37:8a57ebfdfd78 |
---|---|
1 package luan; | 1 package luan; |
2 | 2 |
3 import java.util.Arrays; | 3 import java.util.Arrays; |
4 import java.util.Scanner; | 4 import java.util.Scanner; |
5 import luan.lib.BasicLib; | 5 import luan.lib.BasicLib; |
6 import luan.lib.JavaLib; | |
6 import luan.interp.LuaCompiler; | 7 import luan.interp.LuaCompiler; |
7 | 8 |
8 | 9 |
9 public class CmdLine { | 10 public class CmdLine { |
10 | 11 |
11 public static void main(String[] args) throws Exception { | 12 public static void main(String[] args) throws Exception { |
12 LuaState lua = LuaCompiler.newLuaState(); | 13 LuaState lua = LuaCompiler.newLuaState(); |
13 BasicLib.register(lua); | 14 BasicLib.register(lua); |
15 JavaLib.register(lua); | |
14 boolean interactive = false; | 16 boolean interactive = false; |
15 boolean showVersion = false; | 17 boolean showVersion = false; |
16 int i = 0; | 18 int i = 0; |
17 if( args.length == 0 ) { | 19 if( args.length == 0 ) { |
18 interactive = true; | 20 interactive = true; |