Implement most of metatables

This commit is contained in:
James Roseborough
2007-06-17 02:58:40 +00:00
parent 5d3c86e552
commit 54927db2fc
6 changed files with 68 additions and 17 deletions

View File

@@ -1,9 +1,28 @@
package lua.value;
import lua.StackState;
public class LFunction extends LValue {
public String toString() {
return "function: "+hashCode();
}
public void luaSetTable(StackState state, int base, LValue table, LValue key, LValue val) {
state.top = base;
state.push( this );
state.push( table );
state.push( key );
state.push( val );
this.luaStackCall(state, base, state.top, 1);
}
public void luaGetTable(StackState state, int base, LValue table, LValue key) {
state.top = base;
state.push( this );
state.push( table );
state.push( key );
this.luaStackCall(state, base, state.top, 1);
}
}