diff core/src/luan/LuanState.java @ 647:8e8c30b72e9b

move methods from LuanState to Luan
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 29 Mar 2016 20:39:14 -0600
parents cdc70de628b5
children d3e5414bdf4c
line wrap: on
line diff
--- a/core/src/luan/LuanState.java	Tue Mar 29 19:58:39 2016 -0600
+++ b/core/src/luan/LuanState.java	Tue Mar 29 20:39:14 2016 -0600
@@ -62,26 +62,6 @@
 	}
 
 
-	public Boolean checkBoolean(Object obj) throws LuanException {
-		if( obj instanceof Boolean )
-			return (Boolean)obj;
-		throw new LuanException("attempt to use a " + Luan.type(obj) + " value as a boolean" );
-	}
-
-	public String checkString(Object obj) throws LuanException {
-		if( obj instanceof String )
-			return (String)obj;
-		throw new LuanException("attempt to use a " + Luan.type(obj) + " value as a string" );
-	}
-
-	public LuanFunction checkFunction(Object obj) throws LuanException {
-		if( obj instanceof LuanFunction )
-			return (LuanFunction)obj;
-		throw new LuanException("attempt to call a " + Luan.type(obj) + " value" );
-	}
-
-	abstract public boolean isLessThan(Object o1,Object o2) throws LuanException;
-
 	public String toString(Object obj) throws LuanException {
 		if( obj instanceof LuanTable ) {
 			LuanTable tbl = (LuanTable)obj;
@@ -110,7 +90,7 @@
 	public Number checkNumber(Object obj) throws LuanException {
 		if( obj instanceof Number )
 			return (Number)obj;
-		throw new LuanException(this, "attempt to perform arithmetic on '"+context()+"' (a " + Luan.type(obj) + " value)" );
+		throw new LuanException( "attempt to perform arithmetic on '"+context()+"' (a " + Luan.type(obj) + " value)" );
 	}
 */
 }