summaryrefslogtreecommitdiff
path: root/src/symlist.c
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2020-11-22 11:32:23 +0100
committerAkim Demaille <akim.demaille@gmail.com>2020-11-22 16:01:05 +0100
commit7fe9205b9f58a7235721ba63c0f80ad009eba2b5 (patch)
tree4e2a17689ceeb5bb6df3ea2be43005d746995242 /src/symlist.c
parentd798851e48800f5c36c1a6be1392f465eca617a2 (diff)
downloadbison-7fe9205b9f58a7235721ba63c0f80ad009eba2b5.tar.gz
style: change the format of a debugging function
* src/symlist.c (symbol_list_syms_print): Use braces to make traces easier to read.
Diffstat (limited to 'src/symlist.c')
-rw-r--r--src/symlist.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/symlist.c b/src/symlist.c
index 55c1fb6b..f3bc12bc 100644
--- a/src/symlist.c
+++ b/src/symlist.c
@@ -96,23 +96,24 @@ symbol_list_type_set (symbol_list *syms, uniqstr type_name)
`-----------------------------------------------------------------------*/
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 = "";
for (/* Nothing. */; l && l->content.sym; l = l->next)
{
- fputs (sep, f);
- fputs (l->content_type == SYMLIST_SYMBOL ? "symbol: "
- : l->content_type == SYMLIST_TYPE ? "type: "
- : "invalid content_type: ",
- f);
+ fputs (sep, out);
+ fputs (l->content_type == SYMLIST_SYMBOL ? "symbol{"
+ : l->content_type == SYMLIST_TYPE ? "type{"
+ : "invalid content_type{",
+ out);
if (l->content_type == SYMLIST_SYMBOL)
- symbol_print (l->content.sym, f);
- fputs (l->action_props.is_value_used ? " (used)" : " (unused)", f);
+ symbol_print (l->content.sym, out);
+ fputs (l->action_props.is_value_used ? " (used)" : " (unused)", out);
+ putc ('}', out);
sep = ", ";
}
- fputc (']', f);
+ fputc (']', out);
}