diff src/luan/interp/IndexExpr.java @ 88:6ca02b188dba

add LuanBit to clean up code; add repr(); git-svn-id: https://luan-java.googlecode.com/svn/trunk@89 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Wed, 27 Feb 2013 23:50:32 +0000
parents c84274b18f0c
children f5af13062b10
line wrap: on
line diff
--- a/src/luan/interp/IndexExpr.java	Wed Feb 27 19:42:09 2013 +0000
+++ b/src/luan/interp/IndexExpr.java	Wed Feb 27 23:50:32 2013 +0000
@@ -30,11 +30,11 @@
 		} else {
 			h = luan.getHandler("__index",t);
 			if( h==null )
-				throw new LuanException( luan, op1.se(), "attempt to index '"+op1.se().text()+"' (a " + Luan.type(t) + " value)" );
+				throw luan.bit(op1.se()).exception( "attempt to index '"+op1.se().text()+"' (a " + Luan.type(t) + " value)" );
 		}
 		if( h instanceof LuanFunction ) {
 			LuanFunction fn = (LuanFunction)h;
-			return Luan.first(luan.call(fn,se,"__index",t,key));
+			return Luan.first(luan.bit(se).call(fn,"__index",t,key));
 		}
 		return index(luan,h,key);
 	}