clang  6.0.0svn
Public Member Functions | List of all members
clang::BalancedDelimiterTracker Class Reference

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

#include "clang/Parse/RAIIObjectsForParser.h"

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

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 ()
 
- Public Member Functions inherited from clang::GreaterThanIsOperatorScope
 GreaterThanIsOperatorScope (bool &GTIO, bool Val)
 
 ~GreaterThanIsOperatorScope ()
 

Detailed Description

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

} or parentheses ( ... ).

Definition at line 366 of file RAIIObjectsForParser.h.

Constructor & Destructor Documentation

◆ BalancedDelimiterTracker()

clang::BalancedDelimiterTracker::BalancedDelimiterTracker ( Parser p,
tok::TokenKind  k,
tok::TokenKind  FinalToken = tok::semi 
)
inline

Definition at line 387 of file RAIIObjectsForParser.h.

Member Function Documentation

◆ consumeClose()

bool clang::BalancedDelimiterTracker::consumeClose ( )
inline

◆ consumeOpen()

bool clang::BalancedDelimiterTracker::consumeOpen ( )
inline

◆ expectAndConsume()

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

◆ getCloseLocation()

SourceLocation clang::BalancedDelimiterTracker::getCloseLocation ( ) const
inline

◆ getOpenLocation()

SourceLocation clang::BalancedDelimiterTracker::getOpenLocation ( ) const
inline

◆ getRange()

SourceRange clang::BalancedDelimiterTracker::getRange ( ) const
inline

Definition at line 412 of file RAIIObjectsForParser.h.

Referenced by clang::Parser::ParseUnqualifiedId().

◆ skipToEnd()

void BalancedDelimiterTracker::skipToEnd ( )

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