teditor  1.8.0@@fee5e94
Terminal based editor written in C++
Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
teditor::parser::Token Struct Reference

#include <parse_tree.h>

Public Member Functions

bool isEof () const
 

Public Attributes

uint32_t type
 
Point start
 
Point end
 

Static Public Attributes

static const uint32_t End = uint32_t(-1)
 
static const uint32_t Unknown = uint32_t(-2)
 
static const uint32_t Root = uint32_t(-3)
 

Friends

std::ostream & operator<< (std::ostream &os, const Token &tok)
 

Detailed Description

Represents a token that is being generated by the Lexer

Member Function Documentation

◆ isEof()

bool teditor::parser::Token::isEof ( ) const
inline

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Token tok 
)
friend

Member Data Documentation

◆ end

Point teditor::parser::Token::end

end of this token in the input stream

◆ End

const uint32_t teditor::parser::Token::End = uint32_t(-1)
static

special reserved token for denoting EOF

◆ Root

const uint32_t teditor::parser::Token::Root = uint32_t(-3)
static

special reserved token for denoting root node

◆ start

Point teditor::parser::Token::start

start of this token in the input stream

◆ type

uint32_t teditor::parser::Token::type

token type. Custom parsers are free to define their own types for their internal use. But from an interface perspective, it'll always be an integer for faster lookup.

◆ Unknown

const uint32_t teditor::parser::Token::Unknown = uint32_t(-2)
static

special reserved token for denoting unknown token


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