[cfe-commits] r134419 - in /cfe/trunk: include/clang/Parse/Parser.h lib/Parse/Parser.cpp
Douglas Gregor
dgregor at apple.com
Tue Jul 5 10:13:11 PDT 2011
Author: dgregor
Date: Tue Jul 5 12:13:11 2011
New Revision: 134419
URL: http://llvm.org/viewvc/llvm-project?rev=134419&view=rev
Log:
Some documentation fixes for the parser, from John Freeman
Modified:
cfe/trunk/include/clang/Parse/Parser.h
cfe/trunk/lib/Parse/Parser.cpp
Modified: cfe/trunk/include/clang/Parse/Parser.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=134419&r1=134418&r2=134419&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Tue Jul 5 12:13:11 2011
@@ -424,25 +424,7 @@
Tok.setAnnotationValue(ER.get());
}
- /// TryAnnotateTypeOrScopeToken - If the current token position is on a
- /// typename (possibly qualified in C++) or a C++ scope specifier not followed
- /// by a typename, TryAnnotateTypeOrScopeToken will replace one or more tokens
- /// with a single annotation token representing the typename or C++ scope
- /// respectively.
- /// This simplifies handling of C++ scope specifiers and allows efficient
- /// backtracking without the need to re-parse and resolve nested-names and
- /// typenames.
- /// It will mainly be called when we expect to treat identifiers as typenames
- /// (if they are typenames). For example, in C we do not expect identifiers
- /// inside expressions to be treated as typenames so it will not be called
- /// for expressions in C.
- ///
- /// This returns true if the token was annotated.
bool TryAnnotateTypeOrScopeToken(bool EnteringContext = false);
-
- /// TryAnnotateCXXScopeToken - Like TryAnnotateTypeOrScopeToken but
- /// only annotates C++ scope specifiers. This returns true if there
- /// was an unrecoverable error.
bool TryAnnotateCXXScopeToken(bool EnteringContext = false);
/// TryAltiVecToken - Check for context-sensitive AltiVec identifier tokens,
@@ -517,12 +499,6 @@
};
- /// MatchRHSPunctuation - For punctuation with a LHS and RHS (e.g. '['/']'),
- /// this helper function matches and consumes the specified RHS token if
- /// present. If not present, it emits the specified diagnostic indicating
- /// that the parser failed to match the RHS of the token at LHSLoc. LHSName
- /// should be the name of the unmatched LHS token. This returns the location
- /// of the consumed token.
SourceLocation MatchRHSPunctuation(tok::TokenKind RHSTok,
SourceLocation LHSLoc);
Modified: cfe/trunk/lib/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/Parser.cpp?rev=134419&r1=134418&r2=134419&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/Parser.cpp (original)
+++ cfe/trunk/lib/Parse/Parser.cpp Tue Jul 5 12:13:11 2011
@@ -124,9 +124,8 @@
/// MatchRHSPunctuation - For punctuation with a LHS and RHS (e.g. '['/']'),
/// this helper function matches and consumes the specified RHS token if
-/// present. If not present, it emits the specified diagnostic indicating
-/// that the parser failed to match the RHS of the token at LHSLoc. LHSName
-/// should be the name of the unmatched LHS token.
+/// present. If not present, it emits a corresponding diagnostic indicating
+/// that the parser failed to match the RHS of the token at LHSLoc.
SourceLocation Parser::MatchRHSPunctuation(tok::TokenKind RHSTok,
SourceLocation LHSLoc) {
More information about the cfe-commits
mailing list