runtime: move value formatting functionality to a dedicated api

This commit is contained in:
2026-06-13 13:46:29 +01:00
parent 4c04ca6de8
commit 73519eb7aa
6 changed files with 134 additions and 27 deletions
+20
View File
@@ -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);
}