diff core/src/luan/LuanPropertyMeta.java @ 416:91af5337b9ae

add LuanMeta.__tostring()
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 30 Apr 2015 06:28:25 -0600
parents ce8e19567911
children 23a93c118042
line wrap: on
line diff
--- a/core/src/luan/LuanPropertyMeta.java	Thu Apr 30 06:04:17 2015 -0600
+++ b/core/src/luan/LuanPropertyMeta.java	Thu Apr 30 06:28:25 2015 -0600
@@ -17,6 +17,10 @@
 		return (LuanTable)tbl.getMetatable().get("set");
 	}
 
+	protected String type(LuanTable tbl) {
+		return (String)tbl.getMetatable().get("type");
+	}
+
 	@Override public Object __index(LuanState luan,LuanTable tbl,Object key) throws LuanException {
 		Object obj = getters(tbl).get(key);
 		if( obj == null )
@@ -62,6 +66,7 @@
 		LuanTable mt = super.newMetatable();
 		mt.put( "get", new LuanTable() );
 		mt.put( "set", new LuanTable() );
+		mt.put( "type", "property" );
 		return mt;
 	}