clang
10.0.0git
|
RAII class that helps handle the parsing of an open/close delimiter pair, such as braces { ... More...
#include "clang/Parse/RAIIObjectsForParser.h"
Public Member Functions | |
BalancedDelimiterTracker (Parser &p, tok::TokenKind k, tok::TokenKind FinalToken=tok::semi) | |
SourceLocation | getOpenLocation () const |
SourceLocation | getCloseLocation () const |
SourceRange | getRange () const |
bool | consumeOpen () |
bool | expectAndConsume (unsigned DiagID=diag::err_expected, const char *Msg="", tok::TokenKind SkipToTok=tok::unknown) |
bool | consumeClose () |
void | skipToEnd () |
![]() | |
GreaterThanIsOperatorScope (bool >IO, bool Val) | |
~GreaterThanIsOperatorScope () | |
RAII class that helps handle the parsing of an open/close delimiter pair, such as braces { ...
} or parentheses ( ... ).
Definition at line 385 of file RAIIObjectsForParser.h.
|
inline |
Definition at line 404 of file RAIIObjectsForParser.h.
|
inline |
Definition at line 446 of file RAIIObjectsForParser.h.
References clang::Parser::ConsumeToken(), clang::FixItHint::CreateRemoval(), clang::Parser::Diag(), clang::Token::is(), and clang::Parser::NextToken().
Referenced by addConstevalToLambdaDeclSpecifier(), attributeParsedArgsUnevaluated(), CheckArrayDesignatorSyntax(), CheckAvailabilitySpecList(), diagnoseDynamicExceptionSpecification(), getMissingDeclaratorIdLoc(), IsBuiltInOrStandardCXX11Attribute(), clang::Parser::ObjCTypeParamListScope::leave(), parseDeviceSelector(), parseImplementationSelector(), clang::Parser::parseMapperModifier(), clang::Parser::ParseOpenMPParensExpr(), parseOpenMPSimpleClause(), clang::Parser::ParseOpenMPVarList(), clang::Parser::ParseTopLevelDecl(), clang::Parser::ParseUnqualifiedId(), takeDeclAttributes(), and TypeTraitArity().
|
inline |
Definition at line 431 of file RAIIObjectsForParser.h.
References clang::Parser::getLangOpts(), and clang::Token::is().
Referenced by addConstevalToLambdaDeclSpecifier(), attributeParsedArgsUnevaluated(), CheckArrayDesignatorSyntax(), diagnoseDynamicExceptionSpecification(), getMissingDeclaratorIdLoc(), IsBuiltInOrStandardCXX11Attribute(), clang::Parser::ObjCTypeParamListScope::leave(), clang::Parser::ParseOpenMPVarList(), clang::Parser::ParseTopLevelDecl(), clang::Parser::ParseUnqualifiedId(), takeDeclAttributes(), and VersionNumberSeparator().
bool BalancedDelimiterTracker::expectAndConsume | ( | unsigned | DiagID = diag::err_expected , |
const char * | Msg = "" , |
||
tok::TokenKind | SkipToTok = tok::unknown |
||
) |
Definition at line 2489 of file Parser.cpp.
References clang::Parser::StopAtSemi, and clang::Parser::StopBeforeMatch.
Referenced by addConstevalToLambdaDeclSpecifier(), CheckAvailabilitySpecList(), diagnoseUnknownAttributeSubjectSubRule(), parseDeviceSelector(), parseImplementationSelector(), clang::Parser::parseMapperModifier(), clang::Parser::ParseOpenMPParensExpr(), parseOpenMPReductionId(), parseOpenMPSimpleClause(), clang::Parser::ParseOpenMPVarList(), clang::Parser::ParseUnqualifiedId(), and TypeTraitArity().
|
inline |
Definition at line 428 of file RAIIObjectsForParser.h.
Referenced by addConstevalToLambdaDeclSpecifier(), attributeParsedArgsUnevaluated(), CheckArrayDesignatorSyntax(), CheckAvailabilitySpecList(), diagnoseDynamicExceptionSpecification(), getMissingDeclaratorIdLoc(), IsBuiltInOrStandardCXX11Attribute(), clang::Parser::ObjCTypeParamListScope::leave(), clang::Parser::ParseOpenMPParensExpr(), parseOpenMPSimpleClause(), clang::Parser::ParseOpenMPVarList(), clang::Parser::ParseTopLevelDecl(), clang::Parser::ParseUnqualifiedId(), takeDeclAttributes(), and TypeTraitArity().
|
inline |
Definition at line 427 of file RAIIObjectsForParser.h.
Referenced by addConstevalToLambdaDeclSpecifier(), CheckArrayDesignatorSyntax(), getMissingDeclaratorIdLoc(), clang::Parser::ParseOpenMPParensExpr(), clang::Parser::ParseOpenMPVarList(), clang::Parser::ParseUnqualifiedId(), takeDeclAttributes(), and TypeTraitArity().
|
inline |
Definition at line 429 of file RAIIObjectsForParser.h.
Referenced by getMissingDeclaratorIdLoc(), and clang::Parser::ParseUnqualifiedId().
void BalancedDelimiterTracker::skipToEnd | ( | ) |
Definition at line 2525 of file Parser.cpp.
References clang::Parser::StopBeforeMatch.
Referenced by CheckArrayDesignatorSyntax(), getMissingDeclaratorIdLoc(), IsBuiltInOrStandardCXX11Attribute(), clang::Parser::ParseUnqualifiedId(), and TypeTraitArity().