runtime: move value formatting functionality to a dedicated api
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#include <bshell/runtime/runtime.h>
|
||||
#include <fx/type.h>
|
||||
#include <fx/value-type.h>
|
||||
|
||||
void bshell_runtime_begin_output(struct bshell_runtime *rt)
|
||||
{
|
||||
bshell_value_writer_init(&rt->rt_writer, fx_stdout);
|
||||
}
|
||||
|
||||
void bshell_runtime_output_value(
|
||||
struct bshell_runtime *rt,
|
||||
const fx_value *value)
|
||||
{
|
||||
bshell_value_writer_write(&rt->rt_writer, value);
|
||||
}
|
||||
|
||||
void bshell_runtime_end_output(struct bshell_runtime *rt)
|
||||
{
|
||||
bshell_value_writer_cleanup(&rt->rt_writer);
|
||||
}
|
||||
Reference in New Issue
Block a user