sapphirec
The Sapphire documentation
Lexer Class Reference

#include <Lexer.h>

Public Member Functions

 ~Lexer ()
 
TokenStream lex (const std::string &text)
 

Static Public Member Functions

static std::unique_ptr< Lexermake_lexer (const std::string &fname)
 
static void assign_parent_location (std::unique_ptr< Lexer > &lexer, const std::shared_ptr< Location > &loc)
 

Static Public Attributes

static const std::array< std::string, TYPE_COUNTtypes
 

Constructor & Destructor Documentation

◆ ~Lexer()

Lexer::~Lexer ( )

Member Function Documentation

◆ assign_parent_location()

void Lexer::assign_parent_location ( std::unique_ptr< Lexer > &  lexer,
const std::shared_ptr< Location > &  loc 
)
static

◆ lex()

TokenStream Lexer::lex ( const std::string &  text)

◆ make_lexer()

std::unique_ptr< Lexer > Lexer::make_lexer ( const std::string &  fname)
static

Member Data Documentation

◆ types

const std::array< std::string, TYPE_COUNT > Lexer::types
static
Initial value:
= {"void", "bool", "str", "i8", "i16", "i32", "i64",
"u8", "u16", "u32", "u64", "f32", "f64", "f128"}

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