Phasor 2.2.0
Stack VM based Programming Language
Loading...
Searching...
No Matches
Phasor::Lexer Class Reference

Lexer. More...

#include <Lexer.hpp>

Public Member Functions

 Lexer (const std::string &source)
std::vector< Tokentokenize ()

Private Member Functions

char peek ()
char advance ()
bool isAtEnd ()
void skipWhitespace ()
void skipShebang ()
Token scanToken ()
Token identifier ()
Token number ()
Token string ()
Token complexString ()

Private Attributes

std::string source
size_t position = 0
size_t line = 1
size_t column = 1

Detailed Description

Lexer.

Definition at line 29 of file Lexer.hpp.

Constructor & Destructor Documentation

◆ Lexer()

Phasor::Lexer::Lexer ( const std::string & source)

Definition at line 9 of file Lexer.cpp.

Member Function Documentation

◆ advance()

char Phasor::Lexer::advance ( )
private

Definition at line 47 of file Lexer.cpp.

Here is the caller graph for this function:

◆ complexString()

Token Phasor::Lexer::complexString ( )
private

Definition at line 312 of file Lexer.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ identifier()

Token Phasor::Lexer::identifier ( )
private

Definition at line 167 of file Lexer.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isAtEnd()

bool Phasor::Lexer::isAtEnd ( )
private

Definition at line 59 of file Lexer.cpp.

Here is the caller graph for this function:

◆ number()

Token Phasor::Lexer::number ( )
private

Definition at line 192 of file Lexer.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ peek()

char Phasor::Lexer::peek ( )
private

Definition at line 40 of file Lexer.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scanToken()

Token Phasor::Lexer::scanToken ( )
private

Definition at line 88 of file Lexer.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ skipShebang()

void Phasor::Lexer::skipShebang ( )
private

Definition at line 13 of file Lexer.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ skipWhitespace()

void Phasor::Lexer::skipWhitespace ( )
private

Definition at line 64 of file Lexer.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ string()

Token Phasor::Lexer::string ( )
private

Definition at line 218 of file Lexer.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tokenize()

std::vector< Token > Phasor::Lexer::tokenize ( )

Definition at line 25 of file Lexer.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ column

size_t Phasor::Lexer::column = 1
private

Definition at line 39 of file Lexer.hpp.

◆ line

size_t Phasor::Lexer::line = 1
private

Definition at line 38 of file Lexer.hpp.

◆ position

size_t Phasor::Lexer::position = 0
private

Definition at line 37 of file Lexer.hpp.

◆ source

std::string Phasor::Lexer::source
private

Definition at line 36 of file Lexer.hpp.


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