return BufferPtr == BufferEnd;
}
+ /// SetCommentRetentionMode - Change the comment retention mode of the lexer
+ /// to the specified mode. This is really only useful when lexing in raw
+ /// mode, because otherwise the lexer needs to manage this.
+ void SetCommentRetentionState(bool Mode) {
+ KeepCommentMode = Mode;
+ }
+
/// ReadToEndOfLine - Read the rest of the current preprocessor line as an
/// uninterpreted string. This switches the lexer out of directive mode.
std::string ReadToEndOfLine();
// Inform the preprocessor that we want to retain comments as tokens, so we
// can highlight them.
- //PP.SetCommentRetentionState(true, false);
+ L.SetCommentRetentionState(true);
// Lex all the tokens in raw mode, to avoid entering #includes or expanding
// macros.