PP: Add missing atoms that effect -E mode.
When preprocessing only, some tokens were emitted as <bad token>. This fixes them to preserve their original content. This supplants PR #182, with a correction and test results.
This commit is contained in:
parent
cfc5fbb967
commit
9f9bad09b4
4 changed files with 43 additions and 4 deletions
|
|
@ -98,6 +98,32 @@ const struct {
|
|||
int val;
|
||||
const char* str;
|
||||
} tokens[] = {
|
||||
|
||||
{ PpAtomAdd, "+=" },
|
||||
{ PpAtomSub, "-=" },
|
||||
{ PpAtomMul, "*=" },
|
||||
{ PpAtomDiv, "/=" },
|
||||
{ PpAtomMod, "%=" },
|
||||
{ PpAtomRight, ">>" },
|
||||
{ PpAtomLeft, "<<" },
|
||||
{ PpAtomAnd, "&&" },
|
||||
{ PpAtomOr, "||" },
|
||||
{ PpAtomXor, "^^" },
|
||||
|
||||
{ PpAtomRightAssign, ">>=" },
|
||||
{ PpAtomLeftAssign, "<<=" },
|
||||
{ PpAtomAndAssign, "&=" },
|
||||
{ PpAtomOrAssign, "|=" },
|
||||
{ PpAtomXorAssign, "^=" },
|
||||
|
||||
{ PpAtomEQ, "==" },
|
||||
{ PpAtomNE, "!=" },
|
||||
{ PpAtomGE, ">=" },
|
||||
{ PpAtomLE, "<=" },
|
||||
|
||||
{ PpAtomDecrement, "--" },
|
||||
{ PpAtomIncrement, "++" },
|
||||
|
||||
{ PpAtomDefine, "define" },
|
||||
{ PpAtomDefined, "defined" },
|
||||
{ PpAtomUndef, "undef" },
|
||||
|
|
@ -121,8 +147,7 @@ const struct {
|
|||
{ PpAtomFileMacro, "__FILE__" },
|
||||
{ PpAtomVersionMacro, "__VERSION__" },
|
||||
|
||||
{ PpAtomInclude, "include" },
|
||||
|
||||
{ PpAtomInclude, "include" },
|
||||
};
|
||||
|
||||
} // end anonymous namespace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue