Plot Script
|
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... | |
Value class representing a token.
A token is a composition of a tag type and an optional string value.
enum Token::TokenType |
Token::Token | ( | TokenType | t | ) |
construct a token of type t (if string default to empty value)
Token::Token | ( | const std::string & | str | ) |
contruct a token of type String with value
std::string Token::asString | ( | ) | const |
return the token rendered as a string
Token::TokenType Token::type | ( | ) | const |
return the type of the token