diff options
Diffstat (limited to 'include/clang/Lex/PreprocessorLexer.h')
-rw-r--r-- | include/clang/Lex/PreprocessorLexer.h | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/include/clang/Lex/PreprocessorLexer.h b/include/clang/Lex/PreprocessorLexer.h index b551cd4..8a0b3cf 100644 --- a/include/clang/Lex/PreprocessorLexer.h +++ b/include/clang/Lex/PreprocessorLexer.h @@ -6,9 +6,10 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -// -// This file defines the PreprocessorLexer interface. -// +/// +/// \file +/// \brief Defines the PreprocessorLexer interface. +/// //===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_PreprocessorLexer_H @@ -38,16 +39,17 @@ protected: // Context-specific lexing flags set by the preprocessor. //===--------------------------------------------------------------------===// - /// ParsingPreprocessorDirective - This is true when parsing #XXX. This turns - /// '\n' into a tok::eod token. + /// \brief True when parsing \#XXX; turns '\\n' into a tok::eod token. bool ParsingPreprocessorDirective; - /// ParsingFilename - True after #include: this turns <xx> into a - /// tok::angle_string_literal token. + /// \brief True after \#include; turns \<xx> into a tok::angle_string_literal + /// token. bool ParsingFilename; - /// LexingRawMode - True if in raw mode: This flag disables interpretation of - /// tokens and is a far faster mode to lex in than non-raw-mode. This flag: + /// \brief True if in raw mode. + /// + /// Raw mode disables interpretation of tokens and is a far faster mode to + /// lex in than non-raw-mode. This flag: /// 1. If EOF of the current lexer is found, the include stack isn't popped. /// 2. Identifier information is not looked up for identifier tokens. As an /// effect of this, implicit macro expansion is naturally disabled. @@ -59,11 +61,11 @@ protected: /// Note that in raw mode that the PP pointer may be null. bool LexingRawMode; - /// MIOpt - This is a state machine that detects the #ifndef-wrapping a file + /// \brief A state machine that detects the \#ifndef-wrapping a file /// idiom for the multiple-include optimization. MultipleIncludeOpt MIOpt; - /// ConditionalStack - Information about the set of #if/#ifdef/#ifndef blocks + /// \brief Information about the set of \#if/\#ifdef/\#ifndef blocks /// we are currently in. SmallVector<PPConditionalInfo, 4> ConditionalStack; @@ -83,16 +85,15 @@ protected: virtual void IndirectLex(Token& Result) = 0; - /// getSourceLocation - Return the source location for the next observable - /// location. + /// \brief Return the source location for the next observable location. virtual SourceLocation getSourceLocation() = 0; //===--------------------------------------------------------------------===// // #if directive handling. - /// pushConditionalLevel - When we enter a #if directive, this keeps track of - /// what we are currently in for diagnostic emission (e.g. #if with missing - /// #endif). + /// pushConditionalLevel - When we enter a \#if directive, this keeps track of + /// what we are currently in for diagnostic emission (e.g. \#if with missing + /// \#endif). void pushConditionalLevel(SourceLocation DirectiveStart, bool WasSkipping, bool FoundNonSkip, bool FoundElse) { PPConditionalInfo CI; @@ -116,8 +117,8 @@ protected: return false; } - /// peekConditionalLevel - Return the top of the conditional stack. This - /// requires that there be a conditional active. + /// \brief Return the top of the conditional stack. + /// \pre This requires that there be a conditional active. PPConditionalInfo &peekConditionalLevel() { assert(!ConditionalStack.empty() && "No conditionals active!"); return ConditionalStack.back(); @@ -130,21 +131,23 @@ public: //===--------------------------------------------------------------------===// // Misc. lexing methods. - /// LexIncludeFilename - After the preprocessor has parsed a #include, lex and - /// (potentially) macro expand the filename. If the sequence parsed is not - /// lexically legal, emit a diagnostic and return a result EOD token. + /// \brief After the preprocessor has parsed a \#include, lex and + /// (potentially) macro expand the filename. + /// + /// If the sequence parsed is not lexically legal, emit a diagnostic and + /// return a result EOD token. void LexIncludeFilename(Token &Result); - /// setParsingPreprocessorDirective - Inform the lexer whether or not - /// we are currently lexing a preprocessor directive. + /// \brief Inform the lexer whether or not we are currently lexing a + /// preprocessor directive. void setParsingPreprocessorDirective(bool f) { ParsingPreprocessorDirective = f; } - /// isLexingRawMode - Return true if this lexer is in raw mode or not. + /// \brief Return true if this lexer is in raw mode or not. bool isLexingRawMode() const { return LexingRawMode; } - /// getPP - Return the preprocessor object for this lexer. + /// \brief Return the preprocessor object for this lexer. Preprocessor *getPP() const { return PP; } FileID getFileID() const { @@ -163,7 +166,7 @@ public: const FileEntry *getFileEntry() const; /// \brief Iterator that traverses the current stack of preprocessor - /// conditional directives (#if/#ifdef/#ifndef). + /// conditional directives (\#if/\#ifdef/\#ifndef). typedef SmallVectorImpl<PPConditionalInfo>::const_iterator conditional_iterator; |