comparison core/src/luan/modules/TableLuan.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
comparison
equal deleted inserted replaced
646:cdc70de628b5 647:8e8c30b72e9b
55 final LessThan lt; 55 final LessThan lt;
56 if( comp==null ) { 56 if( comp==null ) {
57 lt = new LessThan() { 57 lt = new LessThan() {
58 public boolean isLessThan(Object o1,Object o2) { 58 public boolean isLessThan(Object o1,Object o2) {
59 try { 59 try {
60 return luan.isLessThan(o1,o2); 60 return Luan.isLessThan(luan,o1,o2);
61 } catch(LuanException e) { 61 } catch(LuanException e) {
62 throw new LuanRuntimeException(e); 62 throw new LuanRuntimeException(e);
63 } 63 }
64 } 64 }
65 }; 65 };
66 } else { 66 } else {
67 lt = new LessThan() { 67 lt = new LessThan() {
68 public boolean isLessThan(Object o1,Object o2) { 68 public boolean isLessThan(Object o1,Object o2) {
69 try { 69 try {
70 return luan.checkBoolean(Luan.first(comp.call(luan,new Object[]{o1,o2}))); 70 return Luan.checkBoolean(Luan.first(comp.call(luan,new Object[]{o1,o2})));
71 } catch(LuanException e) { 71 } catch(LuanException e) {
72 throw new LuanRuntimeException(e); 72 throw new LuanRuntimeException(e);
73 } 73 }
74 } 74 }
75 }; 75 };