LLDB mainline
lldb_private::dil::Token Class Reference

Class defining the tokens generated by the DIL lexer and used by the DIL parser. More...

#include <DILLexer.h>

Public Types

enum  Kind {
  amp , arrow , coloncolon , eof ,
  float_constant , identifier , integer_constant , kw_false ,
  kw_true , l_paren , l_square , minus ,
  period , plus , r_paren , r_square ,
  star
}

Public Member Functions

 Token (Kind kind, std::string spelling, uint32_t start)
Kind GetKind () const
std::string GetSpelling () const
bool Is (Kind kind) const
bool IsNot (Kind kind) const
bool IsOneOf (llvm::ArrayRef< Kind > kinds) const
uint32_t GetLocation () const

Static Public Member Functions

static llvm::StringRef GetTokenName (Kind kind)

Private Attributes

Kind m_kind
std::string m_spelling
uint32_t m_start_pos

Detailed Description

Class defining the tokens generated by the DIL lexer and used by the DIL parser.

Definition at line 24 of file DILLexer.h.

Member Enumeration Documentation

◆ Kind

Enumerator
amp 
arrow 
coloncolon 
eof 
float_constant 
identifier 
integer_constant 
kw_false 
kw_true 
l_paren 
l_square 
minus 
period 
plus 
r_paren 
r_square 
star 

Definition at line 26 of file DILLexer.h.

Constructor & Destructor Documentation

◆ Token()

lldb_private::dil::Token::Token ( Kind kind,
std::string spelling,
uint32_t start )
inline

Definition at line 46 of file DILLexer.h.

References m_kind, m_spelling, and m_start_pos.

Member Function Documentation

◆ GetKind()

◆ GetLocation()

◆ GetSpelling()

◆ GetTokenName()

◆ Is()

bool lldb_private::dil::Token::Is ( Kind kind) const
inline

Definition at line 53 of file DILLexer.h.

References m_kind.

Referenced by lldb_private::dil::DILParser::ParseBooleanLiteral().

◆ IsNot()

bool lldb_private::dil::Token::IsNot ( Kind kind) const
inline

Definition at line 55 of file DILLexer.h.

References m_kind.

◆ IsOneOf()

bool lldb_private::dil::Token::IsOneOf ( llvm::ArrayRef< Kind > kinds) const
inline

Definition at line 57 of file DILLexer.h.

References m_kind.

Member Data Documentation

◆ m_kind

Kind lldb_private::dil::Token::m_kind
private

Definition at line 66 of file DILLexer.h.

Referenced by GetKind(), Is(), IsNot(), IsOneOf(), and Token().

◆ m_spelling

std::string lldb_private::dil::Token::m_spelling
private

Definition at line 67 of file DILLexer.h.

Referenced by GetSpelling(), and Token().

◆ m_start_pos

uint32_t lldb_private::dil::Token::m_start_pos
private

Definition at line 68 of file DILLexer.h.

Referenced by GetLocation(), and Token().


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