diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-05 18:47:05 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-05 18:47:05 -0500 |
| commit | 09423f6d42d86c62beefa4607fba41e3698f1850 (patch) | |
| tree | b5360500f7809a08a83347d1156c53b6a491a31d /types.c | |
| parent | 59a0fe7c13541921985d39df446d0aec480bb448 (diff) | |
Tweak function type spacing when converting it to text
Diffstat (limited to 'types.c')
| -rw-r--r-- | types.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -58,10 +58,10 @@ CORD type_to_cord(type_t *t) { auto fn = Match(t, FunctionType); for (arg_t *arg = fn->args; arg; arg = arg->next) { c = CORD_cat(c, type_to_cord(arg->type)); - if (arg->next) c = CORD_cat(c, ", "); + if (arg->next) c = CORD_cat(c, ","); } if (fn->ret && fn->ret->tag != VoidType) - c = CORD_all(c, "->", type_to_cord(fn->ret)); + c = CORD_all(c, fn->args ? " -> " : "-> ", type_to_cord(fn->ret)); c = CORD_all(c, ")"); return c; } |
