parent
e8800ff3c4
commit
3562d76d5a
|
@ -261,22 +261,26 @@ stnode_set_inside_parens(stnode_t *node, gboolean inside)
|
|||
static char *
|
||||
_node_tostr(stnode_t *node, gboolean pretty)
|
||||
{
|
||||
const char *s;
|
||||
char *s, *repr;
|
||||
|
||||
if (node->type->func_tostr == NULL)
|
||||
s = "FIXME";
|
||||
s = g_strdup("FIXME");
|
||||
else
|
||||
s = node->type->func_tostr(node->data, pretty);
|
||||
|
||||
if (pretty)
|
||||
return g_strdup(s);
|
||||
return s;
|
||||
|
||||
return g_strdup_printf("%s<%s>", stnode_type_name(node), s);
|
||||
repr = g_strdup_printf("%s<%s>", stnode_type_name(node), s);
|
||||
g_free(s);
|
||||
return repr;
|
||||
}
|
||||
|
||||
const char *
|
||||
stnode_tostr(stnode_t *node, gboolean pretty)
|
||||
{
|
||||
ws_assert_magic(node, STNODE_MAGIC);
|
||||
|
||||
if (pretty && node->repr_display != NULL)
|
||||
return node->repr_display;
|
||||
|
||||
|
|
Loading…
Reference in New Issue