topazc
Token Struct Reference

Token structure. More...

#include <token.hpp>

Public Member Functions

 Token (TokenType t, std::string v, uint32_t l, uint32_t c, std::string fn)
std::string to_str ()
 Method for converting token to string.

Public Attributes

TokenType type
std::string value
uint32_t line
uint32_t column
std::string file_name

Detailed Description

Token structure.

Definition at line 92 of file token.hpp.

Constructor & Destructor Documentation

◆ Token()

Token::Token ( TokenType t,
std::string v,
uint32_t l,
uint32_t c,
std::string fn )
inline

Definition at line 100 of file token.hpp.

Member Function Documentation

◆ to_str()

std::string Token::to_str ( )
inline

Method for converting token to string.

This method converting token structure to string. If type of token is unsupported

Returns
String as converted token

Definition at line 109 of file token.hpp.

Member Data Documentation

◆ column

uint32_t Token::column

Token column coordinate

Definition at line 97 of file token.hpp.

◆ file_name

std::string Token::file_name

Name of the file containing the token

Definition at line 98 of file token.hpp.

◆ line

uint32_t Token::line

Token line coordinate

Definition at line 96 of file token.hpp.

◆ type

TokenType Token::type

Token type

Definition at line 93 of file token.hpp.

◆ value

std::string Token::value

Token value

Definition at line 94 of file token.hpp.


The documentation for this struct was generated from the following file:
  • /mnt/disk_ext4_0/topazlang/include/lexer/token.hpp