Mercurial Hosting > luan
diff src/luan/Luan.java @ 1334:c88b486a9511
make some Luan methods static
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 12 Feb 2019 22:53:57 -0700 |
parents | 25746915a241 |
children | e0cf0d108a77 |
line wrap: on
line diff
--- a/src/luan/Luan.java Tue Feb 12 22:33:40 2019 -0700 +++ b/src/luan/Luan.java Tue Feb 12 22:53:57 2019 -0700 @@ -81,7 +81,7 @@ return PackageLuan.require(this,modName); } - public String toString(Object obj) throws LuanException { + public static String luanToString(Object obj) throws LuanException { if( obj instanceof LuanTable ) { LuanTable tbl = (LuanTable)obj; return tbl.toStringLuan(); @@ -123,7 +123,7 @@ throw new LuanException( "attempt to compare " + Luan.type(o1) + " with " + Luan.type(o2) ); } - public LuanFunction getBinHandler(String op,Object o1,Object o2) throws LuanException { + public static LuanFunction getBinHandler(String op,Object o1,Object o2) throws LuanException { if( o1 instanceof LuanTable ) { LuanFunction f1 = getHandlerFunction(op,(LuanTable)o1); if( f1 != null ) @@ -132,7 +132,7 @@ return o2 instanceof LuanTable ? getHandlerFunction(op,(LuanTable)o2) : null; } - public LuanFunction getHandlerFunction(String op,LuanTable t) throws LuanException { + public static LuanFunction getHandlerFunction(String op,LuanTable t) throws LuanException { Object f = t.getHandler(op); if( f == null ) return null;