if (!isLexingRawMode())
Diag(BufferPtr, diag::charize_microsoft_ext);
Kind = tok::hashat;
- } else {
- Kind = tok::hash; // '%:' -> '#'
-
+ } else { // '%:' -> '#'
// We parsed a # character. If this occurs at the start of the line,
// it's actually the start of a preprocessing directive. Callback to
// the preprocessor to handle it.
// FIXME: -fpreprocessed mode??
if (Result.isAtStartOfLine() && !LexingRawMode) {
- BufferPtr = CurPtr;
+ FormTokenWithChars(Result, CurPtr, tok::hash);
PP->HandleDirective(Result);
// As an optimization, if the preprocessor didn't switch lexers, tail
return PP->Lex(Result);
}
+
+ Kind = tok::hash;
}
} else {
Kind = tok::percent;
Diag(BufferPtr, diag::charize_microsoft_ext);
CurPtr = ConsumeChar(CurPtr, SizeTmp, Result);
} else {
- Kind = tok::hash;
// We parsed a # character. If this occurs at the start of the line,
// it's actually the start of a preprocessing directive. Callback to
// the preprocessor to handle it.
// FIXME: -fpreprocessed mode??
if (Result.isAtStartOfLine() && !LexingRawMode) {
- BufferPtr = CurPtr;
+ FormTokenWithChars(Result, CurPtr, tok::hash);
PP->HandleDirective(Result);
// As an optimization, if the preprocessor didn't switch lexers, tail
}
return PP->Lex(Result);
}
+
+ Kind = tok::hash;
}
break;