Commit 1cf3f7fe authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix an indentation problem in the produced C source.

parent 0e984bd4
...@@ -120,7 +120,8 @@ parse_set(struct vcc *tl) ...@@ -120,7 +120,8 @@ parse_set(struct vcc *tl)
vp = vcc_FindVar(tl, tl->t, 1, "cannot be set"); vp = vcc_FindVar(tl, tl->t, 1, "cannot be set");
ERRCHK(tl); ERRCHK(tl);
assert(vp != NULL); assert(vp != NULL);
Fb(tl, 1, "%s", vp->lname); Fb(tl, 1, "%s\n", vp->lname);
tl->indent += INDENT;
vcc_NextToken(tl); vcc_NextToken(tl);
fmt = vp->fmt; fmt = vp->fmt;
for (ap = arith; ap->type != VOID; ap++) { for (ap = arith; ap->type != VOID; ap++) {
...@@ -129,7 +130,7 @@ parse_set(struct vcc *tl) ...@@ -129,7 +130,7 @@ parse_set(struct vcc *tl)
if (ap->oper != tl->t->tok) if (ap->oper != tl->t->tok)
continue; continue;
if (ap->oper != '=') if (ap->oper != '=')
Fb(tl, 0, "%s %c ", vp->rname, *tl->t->b); Fb(tl, 1, "%s %c ", vp->rname, *tl->t->b);
vcc_NextToken(tl); vcc_NextToken(tl);
fmt = ap->want; fmt = ap->want;
break; break;
...@@ -141,6 +142,7 @@ parse_set(struct vcc *tl) ...@@ -141,6 +142,7 @@ parse_set(struct vcc *tl)
} else { } else {
vcc_Expr(tl, fmt); vcc_Expr(tl, fmt);
} }
tl->indent -= INDENT;
Fb(tl, 1, ");\n"); Fb(tl, 1, ");\n");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment