Mercurial Hosting > luan
comparison src/luan/impl/LuanStringWriter.java @ 1796:383703b581bc
add backtick
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 31 Jan 2024 19:13:05 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1795:745f756e719b | 1796:383703b581bc |
---|---|
1 package luan.impl; | |
2 | |
3 import java.io.Writer; | |
4 import java.io.StringWriter; | |
5 import java.io.IOException; | |
6 import luan.Luan; | |
7 import luan.LuanException; | |
8 import luan.modules.IoLuan; | |
9 | |
10 | |
11 public final class LuanStringWriter implements IoLuan.LuanWriter { | |
12 private final Writer out = new StringWriter(); | |
13 | |
14 public Object out() { | |
15 return out; | |
16 } | |
17 | |
18 public void write(Luan luan,Object... args) throws LuanException, IOException { | |
19 for( Object obj : args ) { | |
20 out.write( luan.luanToString(obj) ); | |
21 } | |
22 } | |
23 | |
24 public void close() {} | |
25 } |