LLDB mainline
lldb_private::StringLexer Class Reference

#include <StringLexer.h>

Public Types

typedef std::string::size_type Position
typedef std::string::size_type Size
typedef std::string::value_type Character

Public Member Functions

 StringLexer (std::string s)
Character Peek ()
bool NextIf (Character c)
std::pair< bool, CharacterNextIf (std::initializer_list< Character > cs)
bool AdvanceIf (const std::string &token)
Character Next ()
bool HasAtLeast (Size s)
std::string GetUnlexed ()
void PutBack (Size s)
StringLexeroperator= (const StringLexer &rhs)

Private Member Functions

void Consume ()

Private Attributes

std::string m_data
Position m_position

Detailed Description

Definition at line 18 of file StringLexer.h.

Member Typedef Documentation

◆ Character

typedef std::string::value_type lldb_private::StringLexer::Character

Definition at line 23 of file StringLexer.h.

◆ Position

typedef std::string::size_type lldb_private::StringLexer::Position

Definition at line 20 of file StringLexer.h.

◆ Size

typedef std::string::size_type lldb_private::StringLexer::Size

Definition at line 21 of file StringLexer.h.

Constructor & Destructor Documentation

◆ StringLexer()

StringLexer::StringLexer ( std::string s)

Definition at line 17 of file StringLexer.cpp.

References m_data, and m_position.

Referenced by operator=().

Member Function Documentation

◆ AdvanceIf()

bool StringLexer::AdvanceIf ( const std::string & token)

Definition at line 42 of file StringLexer.cpp.

References m_position, and NextIf().

Referenced by lldb_private::TypeMatcher::StripTypeName().

◆ Consume()

void StringLexer::Consume ( )
private

Definition at line 77 of file StringLexer.cpp.

References m_position.

Referenced by Next().

◆ GetUnlexed()

std::string StringLexer::GetUnlexed ( )

Definition at line 73 of file StringLexer.cpp.

References m_data, and m_position.

Referenced by lldb_private::TypeMatcher::StripTypeName().

◆ HasAtLeast()

◆ Next()

◆ NextIf() [1/2]

◆ NextIf() [2/2]

std::pair< bool, StringLexer::Character > StringLexer::NextIf ( std::initializer_list< Character > cs)

Definition at line 31 of file StringLexer.cpp.

References Next(), and Peek().

◆ operator=()

StringLexer & StringLexer::operator= ( const StringLexer & rhs)

Definition at line 79 of file StringLexer.cpp.

References m_data, m_position, and StringLexer().

◆ Peek()

◆ PutBack()

Member Data Documentation

◆ m_data

std::string lldb_private::StringLexer::m_data
private

Definition at line 48 of file StringLexer.h.

Referenced by GetUnlexed(), HasAtLeast(), operator=(), Peek(), and StringLexer().

◆ m_position

Position lldb_private::StringLexer::m_position
private

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