clang API Documentation

Public Member Functions
clang::BalancedDelimiterTracker Class Reference

RAII class that helps handle the parsing of an open/close delimiter pair, such as braces { ... } or parentheses ( ... ). More...

#include <RAIIObjectsForParser.h>

Inheritance diagram for clang::BalancedDelimiterTracker:
Inheritance graph
[legend]
Collaboration diagram for clang::BalancedDelimiterTracker:
Collaboration graph
[legend]

List of all members.

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 ()

Detailed Description

RAII class that helps handle the parsing of an open/close delimiter pair, such as braces { ... } or parentheses ( ... ).

Definition at line 359 of file RAIIObjectsForParser.h.


Constructor & Destructor Documentation

Definition at line 380 of file RAIIObjectsForParser.h.


Member Function Documentation

Definition at line 422 of file RAIIObjectsForParser.h.

References clang::Token::is().

Referenced by skipToEnd().

Definition at line 407 of file RAIIObjectsForParser.h.

References clang::Parser::getLangOpts(), and clang::Token::is().

bool BalancedDelimiterTracker::expectAndConsume ( unsigned  DiagID = diag::err_expected,
const char *  Msg = "",
tok::TokenKind  SkipToTok = tok::unknown 
)

Definition at line 1926 of file Parse/Parser.cpp.

References clang::Parser::StopAtSemi.

Definition at line 404 of file RAIIObjectsForParser.h.

Definition at line 403 of file RAIIObjectsForParser.h.

Definition at line 405 of file RAIIObjectsForParser.h.

Definition at line 1959 of file Parse/Parser.cpp.

References consumeClose(), and clang::Parser::StopBeforeMatch.


The documentation for this class was generated from the following files: