Plot Script
Public Types | Public Member Functions | List of all members
Token Class Reference

Value class representing a token. More...

#include <token.hpp>

Public Types

enum  TokenType { OPEN, CLOSE, STRING }
 a public enum defining the possible token types. More...
 

Public Member Functions

 Token (TokenType t)
 construct a token of type t (if string default to empty value) More...
 
 Token (const std::string &str)
 contruct a token of type String with value More...
 
TokenType type () const
 return the type of the token More...
 
std::string asString () const
 return the token rendered as a string More...
 

Detailed Description

Value class representing a token.

A token is a composition of a tag type and an optional string value.

Member Enumeration Documentation

◆ TokenType

a public enum defining the possible token types.

Enumerator
OPEN 
CLOSE 
STRING 

Constructor & Destructor Documentation

◆ Token() [1/2]

Token::Token ( TokenType  t)

construct a token of type t (if string default to empty value)

◆ Token() [2/2]

Token::Token ( const std::string &  str)

contruct a token of type String with value

Member Function Documentation

◆ asString()

std::string Token::asString ( ) const

return the token rendered as a string

◆ type()

Token::TokenType Token::type ( ) const

return the type of the token


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