diff options
author | Phil Sutter <phil@nwl.cc> | 2023-12-22 17:00:44 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2024-01-02 18:29:51 +0100 |
commit | 17cef81a8d1d119f457a01214a86e2c0e883ce8f (patch) | |
tree | bec6cf88905a9895e6fdffad9e63c2905effde4f /include | |
parent | d9badd39deb7e2f9509be75e83477ab0a0bf2740 (diff) |
datatype: Describe rt symbol tables
Implement a symbol_table_print() wrapper for the run-time populated
rt_symbol_tables which formats output similar to expr_describe() and
includes the data source.
Since these tables reside in struct output_ctx there is no implicit
connection between data type and therefore providing callbacks for
relevant datat types which feed the data into said wrapper is a simpler
solution than extending expr_describe() itself.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'include')
-rw-r--r-- | include/datatype.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/datatype.h b/include/datatype.h index 09a78945..c4d6282d 100644 --- a/include/datatype.h +++ b/include/datatype.h @@ -252,6 +252,9 @@ extern void symbol_table_print(const struct symbol_table *tbl, extern struct symbol_table *rt_symbol_table_init(const char *filename); extern void rt_symbol_table_free(const struct symbol_table *tbl); +extern void rt_symbol_table_describe(struct output_ctx *octx, const char *name, + const struct symbol_table *tbl, + const struct datatype *type); extern const struct datatype invalid_type; extern const struct datatype verdict_type; |