[cfe-commits] r158773 - /cfe/trunk/include/clang/Lex/PreprocessorLexer.h
James Dennett
jdennett at google.com
Tue Jun 19 17:48:54 PDT 2012
Author: jdennett
Date: Tue Jun 19 19:48:54 2012
New Revision: 158773
URL: http://llvm.org/viewvc/llvm-project?rev=158773&view=rev
Log:
Documentation cleanup:
* Escaped # characters in Doxygen comments as needed;
* Added/fixed \file and \brief markup to add summaries to Doxygen output.
Modified:
cfe/trunk/include/clang/Lex/PreprocessorLexer.h
Modified: cfe/trunk/include/clang/Lex/PreprocessorLexer.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/PreprocessorLexer.h?rev=158773&r1=158772&r2=158773&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/PreprocessorLexer.h (original)
+++ cfe/trunk/include/clang/Lex/PreprocessorLexer.h Tue Jun 19 19:48:54 2012
@@ -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 @@
// 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 @@
/// 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 @@
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 @@
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 @@
//===--------------------------------------------------------------------===//
// 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 {
More information about the cfe-commits
mailing list