Mercurial Hosting > luan
diff src/luan/modules/IoLuan.java @ 1563:8fbcc4747091
remove LuanFunction.luan
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 09 Nov 2020 01:37:57 -0700 |
parents | b89212fd04b5 |
children | c922446f53aa |
line wrap: on
line diff
--- a/src/luan/modules/IoLuan.java Sun Nov 08 16:50:59 2020 -0700 +++ b/src/luan/modules/IoLuan.java Mon Nov 09 01:37:57 2020 -0700 @@ -50,7 +50,7 @@ public interface LuanWriter { public Object out(); - public void write(Object... args) throws LuanException, IOException; + public void write(Luan luan,Object... args) throws LuanException, IOException; public void close() throws IOException; } @@ -61,9 +61,9 @@ return out; } - public void write(Object... args) throws LuanException { + public void write(Luan luan,Object... args) throws LuanException { for( Object obj : args ) { - out.print( Luan.luanToString(obj) ); + out.print( luan.luanToString(obj) ); } } @@ -80,9 +80,9 @@ return out; } - public void write(Object... args) throws LuanException, IOException { + public void write(Luan luan,Object... args) throws LuanException, IOException { for( Object obj : args ) { - out.write( Luan.luanToString(obj) ); + out.write( luan.luanToString(obj) ); } } @@ -93,8 +93,8 @@ } static LuanFunction lines(final BufferedReader in) { - return new LuanFunction(false) { - @Override public Object call(Object[] args) throws LuanException { + return new LuanFunction() { + @Override public Object call(Luan luan,Object[] args) throws LuanException { try { if( args.length > 0 ) { if( args.length > 1 || !"close".equals(args[0]) ) @@ -114,10 +114,10 @@ } static LuanFunction blocks(final InputStream in,final int blockSize) { - return new LuanFunction(false) { + return new LuanFunction() { final byte[] a = new byte[blockSize]; - @Override public Object call(Object[] args) throws LuanException { + @Override public Object call(Luan luan,Object[] args) throws LuanException { try { if( args.length > 0 ) { if( args.length > 1 || !"close".equals(args[0]) ) @@ -290,9 +290,9 @@ return new BufferedOutputStream(outputStream()); } - public void write_text(Object... args) throws LuanException, IOException { + public void write_text(Luan luan,Object... args) throws LuanException, IOException { LuanWriter luanWriter = text_writer(); - luanWriter.write(args); + luanWriter.write(luan,args); luanWriter.close(); } @@ -375,9 +375,9 @@ return out; } - public void write(Object... args) throws LuanException, IOException { + public void write(Luan luan,Object... args) throws LuanException, IOException { for( Object obj : args ) { - out.write( Luan.luanToString(obj) ); + out.write( luan.luanToString(obj) ); } }