LLDB  mainline
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::CPlusPlusNameParser Class Reference

#include <CPlusPlusNameParser.h>

Collaboration diagram for lldb_private::CPlusPlusNameParser:
Collaboration graph
[legend]

Classes

class  Bookmark
 
struct  ParsedFunction
 
struct  ParsedName
 
struct  ParsedNameRanges
 
struct  Range
 

Public Member Functions

 CPlusPlusNameParser (llvm::StringRef text)
 
llvm::Optional< ParsedFunctionParseAsFunctionDefinition ()
 
llvm::Optional< ParsedNameParseAsFullName ()
 

Private Member Functions

bool HasMoreTokens ()
 
void Advance ()
 
void TakeBack ()
 
bool ConsumeToken (clang::tok::TokenKind kind)
 
template<typename... Ts>
bool ConsumeToken (Ts... kinds)
 
Bookmark SetBookmark ()
 
size_t GetCurrentPosition ()
 
clang::Token & Peek ()
 
bool ConsumeBrackets (clang::tok::TokenKind left, clang::tok::TokenKind right)
 
llvm::Optional< ParsedFunctionParseFunctionImpl (bool expect_return_type)
 
llvm::Optional< ParsedFunctionParseFuncPtr (bool expect_return_type)
 
bool ConsumeArguments ()
 
bool ConsumeTemplateArgs ()
 
bool ConsumeAnonymousNamespace ()
 
bool ConsumeLambda ()
 
bool ConsumeOperator ()
 
void SkipTypeQualifiers ()
 
void SkipFunctionQualifiers ()
 
bool ConsumeBuiltinType ()
 
bool ConsumeDecltype ()
 
void SkipPtrsAndRefs ()
 
bool ConsumePtrsAndRefs ()
 
bool ConsumeTypename ()
 
llvm::Optional< ParsedNameRangesParseFullNameImpl ()
 
llvm::StringRef GetTextForRange (const Range &range)
 
void ExtractTokens ()
 

Private Attributes

llvm::StringRef m_text
 
llvm::SmallVector< clang::Token, 30 > m_tokens
 
size_t m_next_token_index = 0
 

Detailed Description

Definition at line 23 of file CPlusPlusNameParser.h.

Constructor & Destructor Documentation

◆ CPlusPlusNameParser()

lldb_private::CPlusPlusNameParser::CPlusPlusNameParser ( llvm::StringRef  text)
inline

Definition at line 25 of file CPlusPlusNameParser.h.

References ExtractTokens().

Member Function Documentation

◆ Advance()

void CPlusPlusNameParser::Advance ( )
private

Definition at line 67 of file CPlusPlusNameParser.cpp.

◆ ConsumeAnonymousNamespace()

bool CPlusPlusNameParser::ConsumeAnonymousNamespace ( )
private

◆ ConsumeArguments()

bool CPlusPlusNameParser::ConsumeArguments ( )
private

Definition at line 174 of file CPlusPlusNameParser.cpp.

◆ ConsumeBrackets()

bool CPlusPlusNameParser::ConsumeBrackets ( clang::tok::TokenKind  left,
clang::tok::TokenKind  right 
)
private

◆ ConsumeBuiltinType()

bool CPlusPlusNameParser::ConsumeBuiltinType ( )
private

Definition at line 418 of file CPlusPlusNameParser.cpp.

◆ ConsumeDecltype()

bool CPlusPlusNameParser::ConsumeDecltype ( )
private

◆ ConsumeLambda()

bool CPlusPlusNameParser::ConsumeLambda ( )
private

◆ ConsumeOperator()

bool CPlusPlusNameParser::ConsumeOperator ( )
private

◆ ConsumePtrsAndRefs()

bool CPlusPlusNameParser::ConsumePtrsAndRefs ( )
private

Definition at line 459 of file CPlusPlusNameParser.cpp.

◆ ConsumeTemplateArgs()

bool CPlusPlusNameParser::ConsumeTemplateArgs ( )
private

◆ ConsumeToken() [1/2]

bool lldb_private::CPlusPlusNameParser::ConsumeToken ( clang::tok::TokenKind  kind)
private

◆ ConsumeToken() [2/2]

template<typename... Ts>
bool CPlusPlusNameParser::ConsumeToken ( Ts...  kinds)
private

Definition at line 82 of file CPlusPlusNameParser.cpp.

◆ ConsumeTypename()

bool CPlusPlusNameParser::ConsumeTypename ( )
private

◆ ExtractTokens()

void CPlusPlusNameParser::ExtractTokens ( )
private

Definition at line 673 of file CPlusPlusNameParser.cpp.

References GetKeywordsMap(), and GetLangOptions().

Referenced by CPlusPlusNameParser().

◆ GetCurrentPosition()

size_t CPlusPlusNameParser::GetCurrentPosition ( )
private

Definition at line 97 of file CPlusPlusNameParser.cpp.

◆ GetTextForRange()

llvm::StringRef CPlusPlusNameParser::GetTextForRange ( const Range range)
private

◆ HasMoreTokens()

bool CPlusPlusNameParser::HasMoreTokens ( )
private

Definition at line 63 of file CPlusPlusNameParser.cpp.

◆ ParseAsFullName()

Optional< ParsedName > CPlusPlusNameParser::ParseAsFullName ( )

◆ ParseAsFunctionDefinition()

Optional< ParsedFunction > CPlusPlusNameParser::ParseAsFunctionDefinition ( )

◆ ParseFullNameImpl()

Optional< CPlusPlusNameParser::ParsedNameRanges > CPlusPlusNameParser::ParseFullNameImpl ( )
private

◆ ParseFuncPtr()

Optional< ParsedFunction > CPlusPlusNameParser::ParseFuncPtr ( bool  expect_return_type)
private

◆ ParseFunctionImpl()

Optional< ParsedFunction > CPlusPlusNameParser::ParseFunctionImpl ( bool  expect_return_type)
private

◆ Peek()

clang::Token & CPlusPlusNameParser::Peek ( )
private

Definition at line 99 of file CPlusPlusNameParser.cpp.

◆ SetBookmark()

CPlusPlusNameParser::Bookmark CPlusPlusNameParser::SetBookmark ( )
private

Definition at line 93 of file CPlusPlusNameParser.cpp.

◆ SkipFunctionQualifiers()

void CPlusPlusNameParser::SkipFunctionQualifiers ( )
private

Definition at line 413 of file CPlusPlusNameParser.cpp.

◆ SkipPtrsAndRefs()

void CPlusPlusNameParser::SkipPtrsAndRefs ( )
private

Definition at line 454 of file CPlusPlusNameParser.cpp.

◆ SkipTypeQualifiers()

void CPlusPlusNameParser::SkipTypeQualifiers ( )
private

Definition at line 408 of file CPlusPlusNameParser.cpp.

◆ TakeBack()

void CPlusPlusNameParser::TakeBack ( )
private

Definition at line 69 of file CPlusPlusNameParser.cpp.

Member Data Documentation

◆ m_next_token_index

size_t lldb_private::CPlusPlusNameParser::m_next_token_index = 0
private

Definition at line 65 of file CPlusPlusNameParser.h.

◆ m_text

llvm::StringRef lldb_private::CPlusPlusNameParser::m_text
private

Definition at line 61 of file CPlusPlusNameParser.h.

◆ m_tokens

llvm::SmallVector<clang::Token, 30> lldb_private::CPlusPlusNameParser::m_tokens
private

Definition at line 63 of file CPlusPlusNameParser.h.


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