diff core/src/luan/impl/LuanCompiler.java @ 221:ec016471c6eb

make LuanTable an interface git-svn-id: https://luan-java.googlecode.com/svn/trunk@222 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Thu, 17 Jul 2014 07:49:26 +0000
parents b2304de4579b
children fed1893821bf
line wrap: on
line diff
--- a/core/src/luan/impl/LuanCompiler.java	Wed Jul 16 04:59:45 2014 +0000
+++ b/core/src/luan/impl/LuanCompiler.java	Thu Jul 17 07:49:26 2014 +0000
@@ -6,6 +6,7 @@
 import luan.LuanSource;
 import luan.LuanElement;
 import luan.LuanTable;
+import luan.Luan;
 import java.util.Map;
 
 
@@ -15,7 +16,7 @@
 	public static LuanFunction compile(LuanState luan,LuanSource src,LuanTable env,boolean allowExpr) throws LuanException {
 		boolean passedEnv = env != null;
 		if( !passedEnv )
-			env = new LuanTable();
+			env = Luan.newTable();
 		UpValue.Getter envGetter = new UpValue.ValueGetter(env);
 		LuanParser parser = new LuanParser(src,envGetter);
 		for( Map.Entry<Object,Object> entry : luan.global() ) {