Commit 64e2ba27 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Wrap the "if (ctx->handling) return;" check in a macro for readability

parent 3e15c14f
......@@ -579,6 +579,8 @@ vcc_CompileSource(struct vcc *tl, struct source *sp)
Fh(tl, 0, "/* ---===### VCC generated .h code ###===---*/\n");
Fc(tl, 0, "\n/* ---===### VCC generated .c code ###===---*/\n");
Fc(tl, 0, "\n#define END_ if (*ctx->handling) return\n");
vcc_Parse_Init(tl);
vcc_Expr_Init(tl);
......
......@@ -149,7 +149,7 @@ vcc_Compound(struct vcc *tl)
Fb(tl, 1, "{\n");
tl->indent += INDENT;
C(tl, ";");
Fb(tl, 1, "if (*ctx->handling) return;\n");
Fb(tl, 1, "END_;\n");
while (1) {
ERRCHK(tl);
t = tl->t;
......@@ -206,7 +206,7 @@ vcc_Compound(struct vcc *tl)
vcc_ErrWhere(tl, tl->t);
return;
}
Fb(tl, 1, "if (*ctx->handling) return;\n");
Fb(tl, 1, "END_;\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