case KUNDEF:
tp += 1; if (tp->type != NAME || trp->lp - trp->bp != 4)
{
error(ERROR, "Syntax error in #undef"); break;
} if ((np = lookup(tp, 0)) != NULL)
{
np->flag &= ~ISDEFINED;
if (Mflag)
{ if (np->ap)
error(INFO, "Macro deletion of %s(%r)", np->name, np->ap); else
error(INFO, "Macro deletion of %s", np->name);
}
} break;
case KPRAGMA: case KIDENT: for (tp = trp->tp - 1; ((tp->type != NL) && (tp < trp->lp)); tp++)
tp->type = UNCLASS; return;
case KIFDEF: case KIFNDEF: case KIF: if (++ifdepth >= NIF)
error(FATAL, "#if too deeply nested");
++cursource->ifdepth;
ifsatisfied[ifdepth] = 0; if (eval(trp, np->val))
ifsatisfied[ifdepth] = 1; else
skipping = ifdepth; break;
case KELIF: if (ifdepth == 0)
{
error(ERROR, "#elif with no #if"); return;
} if (ifsatisfied[ifdepth] == 2)
error(ERROR, "#elif after #else"); if (eval(trp, np->val))
{ if (ifsatisfied[ifdepth])
skipping = ifdepth; else
{
skipping = 0;
ifsatisfied[ifdepth] = 1;
}
} else
skipping = ifdepth; break;
case KELSE: if (ifdepth == 0 || cursource->ifdepth == 0)
{
error(ERROR, "#else with no #if"); return;
} if (ifsatisfied[ifdepth] == 2)
error(ERROR, "#else after #else"); if (trp->lp - trp->bp != 3)
error(ERROR, "Syntax error in #else");
skipping = ifsatisfied[ifdepth] ? ifdepth : 0;
ifsatisfied[ifdepth] = 2; break;
case KENDIF: if (ifdepth == 0 || cursource->ifdepth == 0)
{
error(ERROR, "#endif with no #if"); return;
}
--ifdepth;
--cursource->ifdepth; if (trp->lp - trp->bp != 3)
error(WARNING, "Syntax error in #endif"); break;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.