PP: Non-functional; fix typos and blank spaces.
This commit is contained in:
parent
73d4fb5bc5
commit
7208473c69
8 changed files with 28 additions and 28 deletions
|
|
@ -192,7 +192,7 @@ int TPpContext::CPPdefine(TPpToken* ppToken)
|
|||
do {
|
||||
int oldToken;
|
||||
TPpToken oldPpToken;
|
||||
TPpToken newPpToken;
|
||||
TPpToken newPpToken;
|
||||
oldToken = ReadToken(symb->mac.body, &oldPpToken);
|
||||
newToken = ReadToken(mac.body, &newPpToken);
|
||||
if (oldToken != newToken || oldPpToken != newPpToken) {
|
||||
|
|
@ -250,7 +250,7 @@ int TPpContext::CPPelse(int matchelse, TPpToken* ppToken)
|
|||
if (token != '#') {
|
||||
while (token != '\n' && token != EndOfInput)
|
||||
token = scanToken(ppToken);
|
||||
|
||||
|
||||
if (token == EndOfInput)
|
||||
return token;
|
||||
|
||||
|
|
@ -495,7 +495,7 @@ int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, boo
|
|||
if (op < 0 || binop[op].precedence <= precedence)
|
||||
break;
|
||||
int leftSide = res;
|
||||
|
||||
|
||||
// Setup short-circuiting, needed for ES, unless already in a short circuit.
|
||||
// (Once in a short-circuit, can't turn off again, until that whole subexpression is done.
|
||||
if (! shortCircuit) {
|
||||
|
|
@ -756,7 +756,7 @@ int TPpContext::CPPpragma(TPpToken* ppToken)
|
|||
else
|
||||
parseContext.handlePragma(loc, tokens);
|
||||
|
||||
return token;
|
||||
return token;
|
||||
}
|
||||
|
||||
// #version: This is just for error checking: the version and profile are decided before preprocessing starts
|
||||
|
|
@ -980,7 +980,7 @@ int TPpContext::tMacroInput::scan(TPpToken* ppToken)
|
|||
|
||||
if (token == EndOfInput)
|
||||
mac->busy = 0;
|
||||
|
||||
|
||||
return token;
|
||||
}
|
||||
|
||||
|
|
@ -1060,7 +1060,7 @@ int TPpContext::MacroExpand(int atom, TPpToken* ppToken, bool expandUndef, bool
|
|||
if (sym->mac.args) {
|
||||
token = scanToken(ppToken);
|
||||
if (newLineOkay) {
|
||||
while (token == '\n')
|
||||
while (token == '\n')
|
||||
token = scanToken(ppToken);
|
||||
}
|
||||
if (token != '(') {
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
|
|||
ppToken->name[len++] = (char)ch;
|
||||
ch = getch();
|
||||
if (ch == 'x' || ch == 'X') {
|
||||
// must be hexidecimal
|
||||
// must be hexadecimal
|
||||
|
||||
bool isUnsigned = false;
|
||||
bool isInt64 = false;
|
||||
|
|
@ -319,11 +319,11 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
|
|||
} else if (ch >= 'a' && ch <= 'f') {
|
||||
ii = ch - 'a' + 10;
|
||||
} else
|
||||
pp->parseContext.ppError(ppToken->loc, "bad digit in hexidecimal literal", "", "");
|
||||
pp->parseContext.ppError(ppToken->loc, "bad digit in hexadecimal literal", "", "");
|
||||
ival = (ival << 4) | ii;
|
||||
} else {
|
||||
if (! AlreadyComplained) {
|
||||
pp->parseContext.ppError(ppToken->loc, "hexidecimal literal too big", "", "");
|
||||
pp->parseContext.ppError(ppToken->loc, "hexadecimal literal too big", "", "");
|
||||
AlreadyComplained = 1;
|
||||
}
|
||||
ival = 0xffffffffffffffffull;
|
||||
|
|
@ -333,7 +333,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
|
|||
(ch >= 'A' && ch <= 'F') ||
|
||||
(ch >= 'a' && ch <= 'f'));
|
||||
} else {
|
||||
pp->parseContext.ppError(ppToken->loc, "bad digit in hexidecimal literal", "", "");
|
||||
pp->parseContext.ppError(ppToken->loc, "bad digit in hexadecimal literal", "", "");
|
||||
}
|
||||
if (ch == 'u' || ch == 'U') {
|
||||
if (len < MaxTokenLength)
|
||||
|
|
@ -405,7 +405,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
|
|||
}
|
||||
if (ch == '.' || ch == 'e' || ch == 'f' || ch == 'E' || ch == 'F')
|
||||
return pp->lFloatConst(len, ch, ppToken);
|
||||
|
||||
|
||||
// wasn't a float, so must be octal...
|
||||
if (nonOctal)
|
||||
pp->parseContext.ppError(ppToken->loc, "octal literal digit too large", "", "");
|
||||
|
|
@ -447,7 +447,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
|
|||
break;
|
||||
case '1': case '2': case '3': case '4':
|
||||
case '5': case '6': case '7': case '8': case '9':
|
||||
// can't be hexidecimal or octal, is either decimal or floating point
|
||||
// can't be hexadecimal or octal, is either decimal or floating point
|
||||
|
||||
do {
|
||||
if (len < MaxTokenLength)
|
||||
|
|
@ -705,7 +705,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken)
|
|||
// Return 0 when no more tokens.
|
||||
//
|
||||
const char* TPpContext::tokenize(TPpToken* ppToken)
|
||||
{
|
||||
{
|
||||
int token = '\n';
|
||||
|
||||
for(;;) {
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ enum EFixedAtoms {
|
|||
PpAtomConstDouble,
|
||||
PpAtomConstString,
|
||||
|
||||
// Indentifiers
|
||||
// Identifiers
|
||||
PpAtomIdentifier,
|
||||
|
||||
// preprocessor "keywords"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue