Support Forum G3D Web Page |
For use with TextInput.
More...
Public Types | |
enum | ExtendedType { DOUBLE_QUOTED_TYPE, SINGLE_QUOTED_TYPE, SYMBOL_TYPE, FLOATING_POINT_TYPE, INTEGER_TYPE, HEX_INTEGER_TYPE, BOOLEAN_TYPE, LINE_COMMENT_TYPE, BLOCK_COMMENT_TYPE, NEWLINE_TYPE, END_TYPE } |
More detailed type information than Type. More... | |
enum | Type { STRING = DOUBLE_QUOTED_TYPE, SYMBOL = SYMBOL_TYPE, NUMBER = FLOATING_POINT_TYPE, BOOLEAN = BOOLEAN_TYPE, COMMENT = LINE_COMMENT_TYPE, NEWLINE = NEWLINE_TYPE, END = END_TYPE } |
Strings are enclosed in quotes, symbols are not. More... | |
Public Member Functions | |
Token () | |
Token (Type t, ExtendedType e, const String &s, int L, int c, uint64 byte) | |
Token (Type t, ExtendedType e, const String &s, bool b, int L, int c, uint64 byte) | |
bool | boolean () const |
uint64 | bytePosition () const |
Number of bytes from the beginning of the buffer that this token was parsed from. More... | |
int | character () const |
Starting character position in the input line from which this token was parsed. More... | |
ExtendedType | extendedType () const |
int | line () const |
Starting line of the input from which this token was parsed. More... | |
double | number () const |
Return the numeric value for a number type, or zero if this is not a number type. More... | |
const String & | string () const |
The value of a single or double quote string (not including the quotes), the name of a symbol, or the exact textual representation of a number as parsed from the input. More... | |
Type | type () const |
Friends | |
class | TextInput |
For use with TextInput.
enum G3D::Token::Type |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Number of bytes from the beginning of the buffer that this token was parsed from.
Begins at 0
|
inline |
Starting character position in the input line from which this token was parsed.
Starts at 1.
|
inline |
|
inline |
Starting line of the input from which this token was parsed.
Starts at 1.
double G3D::Token::number | ( | ) | const |
Return the numeric value for a number type, or zero if this is not a number type.
|
inline |
The value of a single or double quote string (not including the quotes), the name of a symbol, or the exact textual representation of a number as parsed from the input.
|
inline |
|
friend |