#include <TextInput.h>
|
enum | ExtendedType {
DOUBLE_QUOTED_TYPE,
SINGLE_QUOTED_TYPE,
SYMBOL_TYPE,
FLOATING_POINT_TYPE,
INTEGER_TYPE,
BOOLEAN_TYPE,
LINE_COMMENT_TYPE,
BLOCK_COMMENT_TYPE,
NEWLINE_TYPE,
END_TYPE
} |
|
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
} |
|
|
| Token () |
|
| Token (Type t, ExtendedType e, const std::string &s, int L, int c, uint64 byte) |
|
| Token (Type t, ExtendedType e, const std::string &s, bool b, int L, int c, uint64 byte) |
|
Type | type () const |
|
ExtendedType | extendedType () const |
|
const std::string & | string () const |
|
bool | boolean () const |
|
int | line () const |
|
int | character () const |
|
uint64 | bytePosition () const |
|
double | number () const |
|
More detailed type information than Type.
Enumerator |
---|
DOUBLE_QUOTED_TYPE |
|
SINGLE_QUOTED_TYPE |
|
SYMBOL_TYPE |
|
FLOATING_POINT_TYPE |
|
INTEGER_TYPE |
|
BOOLEAN_TYPE |
|
LINE_COMMENT_TYPE |
|
BLOCK_COMMENT_TYPE |
|
NEWLINE_TYPE |
|
END_TYPE |
|
Definition: TextInput.h:46
Definition: TextInput.h:45
Definition: TextInput.h:50
Definition: TextInput.h:43
Definition: TextInput.h:48
Definition: TextInput.h:47
Definition: TextInput.h:41
Definition: TextInput.h:42
Definition: TextInput.h:49
Definition: TextInput.h:44
Strings are enclosed in quotes, symbols are not.
Enumerator |
---|
STRING |
|
SYMBOL |
|
NUMBER |
|
BOOLEAN |
|
COMMENT |
|
NEWLINE |
|
END |
|
Definition: TextInput.h:61
Definition: TextInput.h:46
Definition: TextInput.h:62
Definition: TextInput.h:57
Definition: TextInput.h:58
Definition: TextInput.h:50
Definition: TextInput.h:63
Definition: TextInput.h:43
Definition: TextInput.h:60
Definition: TextInput.h:47
Definition: TextInput.h:59
Definition: TextInput.h:41
Definition: TextInput.h:49
Definition: TextInput.h:44
Definition: TextInput.h:50
int _character
Definition: TextInput.h:78
Definition: TextInput.h:63
ExtendedType _extendedType
Definition: TextInput.h:81
uint64 _bytePosition
Definition: TextInput.h:79
int _line
Definition: TextInput.h:77
bool _bool
Definition: TextInput.h:76
std::string _string
Definition: TextInput.h:74
Type _type
Definition: TextInput.h:80
int _character
Definition: TextInput.h:78
ExtendedType _extendedType
Definition: TextInput.h:81
uint64 _bytePosition
Definition: TextInput.h:79
#define byte(x, n)
Definition: tomcrypt_macros.h:419
int _line
Definition: TextInput.h:77
bool _bool
Definition: TextInput.h:76
std::string _string
Definition: TextInput.h:74
Type _type
Definition: TextInput.h:80
int _character
Definition: TextInput.h:78
ExtendedType _extendedType
Definition: TextInput.h:81
uint64 _bytePosition
Definition: TextInput.h:79
#define byte(x, n)
Definition: tomcrypt_macros.h:419
int _line
Definition: TextInput.h:77
bool _bool
Definition: TextInput.h:76
std::string _string
Definition: TextInput.h:74
Type _type
Definition: TextInput.h:80
bool G3D::Token::boolean |
( |
| ) |
const |
|
inline |
bool _bool
Definition: TextInput.h:76
uint64 G3D::Token::bytePosition |
( |
| ) |
const |
|
inline |
Number of bytes from the beginning of the buffer that this token was parsed from. Begins at 0
uint64 _bytePosition
Definition: TextInput.h:79
int G3D::Token::character |
( |
| ) |
const |
|
inline |
Starting character position in the input line from which this token was parsed. Starts at 1.
int _character
Definition: TextInput.h:78
ExtendedType _extendedType
Definition: TextInput.h:81
int G3D::Token::line |
( |
| ) |
const |
|
inline |
Starting line of the input from which this token was parsed. Starts at 1.
int _line
Definition: TextInput.h:77
double G3D::Token::number |
( |
| ) |
const |
Return the numeric value for a number type, or zero if this is not a number type.
Definition: TextInput.h:59
std::string _string
Definition: TextInput.h:74
static double parseNumber(const std::string &_string)
Definition: TextInput.cpp:46
Type _type
Definition: TextInput.h:80
const std::string& G3D::Token::string |
( |
| ) |
const |
|
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.
std::string _string
Definition: TextInput.h:74
Type G3D::Token::type |
( |
| ) |
const |
|
inline |
Type _type
Definition: TextInput.h:80
uint64 G3D::Token::_bytePosition |
|
private |
int G3D::Token::_character |
|
private |
std::string G3D::Token::_string |
|
private |
Holds the actual value, which might be any type. If a number, it will be parsed at runtime.
The documentation for this class was generated from the following files: