Skip to content
Permalink
Browse files

Polish the generated C code for the set action

  • Loading branch information...
Dridi committed Nov 6, 2019
1 parent d6127c3 commit 2a5db07e0cc67094b4db6d10c4b9e90d46ea0d4b
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/libvcc/vcc_action.c
@@ -92,16 +92,18 @@ static void
vcc_assign_expr(struct vcc *tl, struct symbol *sym, const struct assign *ap)
{
const char *e;
unsigned indent = 1;

e = ap->expr;
if (e == NULL)
return;

while (*e != '\0') {
if (*e == '\v')
Fb(tl, 0, "%s", sym->rname);
Fb(tl, indent, "%s", sym->rname);
else
Fb(tl, 0, "%c", *e);
Fb(tl, indent, "%c", *e);
indent = 0;
e++;
}
}

0 comments on commit 2a5db07

Please sign in to comment.
You can’t perform that action at this time.