Add binary compares, some unary ops, fix binary arithmetic, add plain for loop.

This commit is contained in:
James Roseborough
2007-06-10 19:49:47 +00:00
parent 70dfc20f57
commit e1e6625aa1
8 changed files with 121 additions and 1 deletions

View File

@@ -34,6 +34,24 @@ public class LValue {
return luaUnsupportedOperation();
}
// unsupported except for numbers
public boolean luaBinCmpUnknown(int opcode, LValue lhs) {
luaUnsupportedOperation();
return false;
}
// unsupported except for numbers
public boolean luaBinCmpInteger(int opcode, int rhs) {
luaUnsupportedOperation();
return false;
}
// unsupported except for numbers
public boolean luaBinCmpDouble(int opcode, double rhs) {
luaUnsupportedOperation();
return false;
}
/** set a value in a table
*/
public void luaSetTable(LValue key, LValue value) {
@@ -61,5 +79,17 @@ public class LValue {
luaUnsupportedOperation();
return 0;
}
/** Arithmetic negative */
public LValue luaUnaryMinus() {
return luaUnsupportedOperation();
}
/** Built-in opcode LEN, for Strings and Tables */
public LValue luaLength() {
// TODO: call meta-method TM_LEN here
return luaUnsupportedOperation();
}
}