Compute Library
 21.11
Token Struct Reference

Token. More...

#include <MLGOParser.h>

Collaboration diagram for Token:
[legend]

Public Member Functions

 Token (TokenType t, std::string v, CharPosition pos)
 
bool operator== (const Token &other) const
 

Data Fields

TokenType type
 Token type. More...
 
std::string value
 Token value. More...
 
CharPosition pos
 

Detailed Description

Token.

Definition at line 106 of file MLGOParser.h.

Constructor & Destructor Documentation

◆ Token()

Token ( TokenType  t,
std::string  v,
CharPosition  pos 
)
inline

Definition at line 108 of file MLGOParser.h.

109  : type{ t }, value{ v }, pos{ pos }
110  {
111  }
std::string value
Token value.
Definition: MLGOParser.h:119
TokenType type
Token type.
Definition: MLGOParser.h:118

Member Function Documentation

◆ operator==()

bool operator== ( const Token other) const
inline

Definition at line 113 of file MLGOParser.h.

References Token::pos, Token::type, type, and Token::value.

114  {
115  return type == other.type && value == other.value && pos == other.pos;
116  }
std::string value
Token value.
Definition: MLGOParser.h:119
TokenType type
Token type.
Definition: MLGOParser.h:118

Field Documentation

◆ pos

Definition at line 120 of file MLGOParser.h.

Referenced by Token::operator==().

◆ type

TokenType type

Token type.

Definition at line 118 of file MLGOParser.h.

Referenced by Token::operator==().

◆ value

std::string value

Token value.

Definition at line 119 of file MLGOParser.h.

Referenced by Token::operator==().


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