Mercurial Hosting > luan
comparison src/luan/interp/IndexExpr.java @ 56:c84274b18f0c
various
git-svn-id: https://luan-java.googlecode.com/svn/trunk@57 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 04 Jan 2013 21:35:55 +0000 |
parents | 8ede219cd111 |
children | 6ca02b188dba |
comparison
equal
deleted
inserted
replaced
55:9381b23ea9e1 | 56:c84274b18f0c |
---|---|
28 if( h==null ) | 28 if( h==null ) |
29 return null; | 29 return null; |
30 } else { | 30 } else { |
31 h = luan.getHandler("__index",t); | 31 h = luan.getHandler("__index",t); |
32 if( h==null ) | 32 if( h==null ) |
33 throw new LuanException( luan, se, "attempt to index a " + Luan.type(t) + " value" ); | 33 throw new LuanException( luan, op1.se(), "attempt to index '"+op1.se().text()+"' (a " + Luan.type(t) + " value)" ); |
34 } | 34 } |
35 if( h instanceof LuanFunction ) { | 35 if( h instanceof LuanFunction ) { |
36 LuanFunction fn = (LuanFunction)h; | 36 LuanFunction fn = (LuanFunction)h; |
37 return Luan.first(luan.call(fn,se,"__index",t,key)); | 37 return Luan.first(luan.call(fn,se,"__index",t,key)); |
38 } | 38 } |