![]() |
Zen
A cross-platform functional programming language
|
The token data returned by the scanner. More...
#include <Token.hpp>
Public Member Functions | |
| void | initString (char *str, const int &len) |
| Initialize string. | |
| void | init () |
| Initialize common members. | |
| void | createValue (const z::string &v) |
| Create a large string in the token data, if necessary. | |
| Token () | |
| Default constructor. | |
| Token (const int &i, const z::string &v, const bool &h) | |
| Default constructor. | |
| Token (const z::string &v) | |
| Default constructor. | |
| Token (const int &i, const z::string &v, const bool &h, const int &l, const int &c) | |
| Default constructor. | |
| void | copyFrom (const zbl::Token &src) |
| Copy data from othr instance. | |
| Token (const zbl::Token &src) | |
| Copy constructor. | |
| Token & | operator= (const zbl::Token &src) |
| Assignment operator. | |
Static Public Member Functions | |
| static void | deleteValue (zbl::TokenData &td) |
| Delete large string stored in the token data, if any. | |
| static z::string | getValue (const zbl::TokenData &td) |
| Get the value in a token. | |
Private Attributes | |
| z::string | text |
| The token text. | |
The token data returned by the scanner.
| Token | ( | const zbl::Token & | src | ) | [inline] |
Copy constructor.
| src | Source instance |
| void copyFrom | ( | const zbl::Token & | src | ) | [inline] |
Copy data from othr instance.
| src | Source instance |
| void createValue | ( | const z::string & | v | ) | [inline] |
Create a large string in the token data, if necessary.
| v | The string to assign to this token |
| static void deleteValue | ( | zbl::TokenData & | td | ) | [inline, static] |
Delete large string stored in the token data, if any.
| td | The TokenData to clean |
| static z::string getValue | ( | const zbl::TokenData & | td | ) | [inline, static] |
Get the value in a token.
Returns the large member if it is non-zero, or the value member.
| td | The TokenData |
| void initString | ( | char * | str, |
| const int & | len | ||
| ) | [inline] |
Initialize string.
| str | The string to initialize |
| len | Length of string |
| Token& operator= | ( | const zbl::Token & | src | ) | [inline] |
Assignment operator.
| src | Source instance |