mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 10:13:03 +00:00
style: change the format of a debugging function
* src/symlist.c (symbol_list_syms_print): Use braces to make traces easier to read.
This commit is contained in:
@@ -96,23 +96,24 @@ symbol_list_type_set (symbol_list *syms, uniqstr type_name)
|
|||||||
`-----------------------------------------------------------------------*/
|
`-----------------------------------------------------------------------*/
|
||||||
|
|
||||||
void
|
void
|
||||||
symbol_list_syms_print (const symbol_list *l, FILE *f)
|
symbol_list_syms_print (const symbol_list *l, FILE *out)
|
||||||
{
|
{
|
||||||
fputc ('[', f);
|
fputc ('[', out);
|
||||||
char const *sep = "";
|
char const *sep = "";
|
||||||
for (/* Nothing. */; l && l->content.sym; l = l->next)
|
for (/* Nothing. */; l && l->content.sym; l = l->next)
|
||||||
{
|
{
|
||||||
fputs (sep, f);
|
fputs (sep, out);
|
||||||
fputs (l->content_type == SYMLIST_SYMBOL ? "symbol: "
|
fputs (l->content_type == SYMLIST_SYMBOL ? "symbol{"
|
||||||
: l->content_type == SYMLIST_TYPE ? "type: "
|
: l->content_type == SYMLIST_TYPE ? "type{"
|
||||||
: "invalid content_type: ",
|
: "invalid content_type{",
|
||||||
f);
|
out);
|
||||||
if (l->content_type == SYMLIST_SYMBOL)
|
if (l->content_type == SYMLIST_SYMBOL)
|
||||||
symbol_print (l->content.sym, f);
|
symbol_print (l->content.sym, out);
|
||||||
fputs (l->action_props.is_value_used ? " (used)" : " (unused)", f);
|
fputs (l->action_props.is_value_used ? " (used)" : " (unused)", out);
|
||||||
|
putc ('}', out);
|
||||||
sep = ", ";
|
sep = ", ";
|
||||||
}
|
}
|
||||||
fputc (']', f);
|
fputc (']', out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user