![]() |
HAL
|
#include <token_stream.h>
Public Member Functions | |
Token (u32 n, const T s) | |
operator T () const | |
Token< T > & | operator= (const T &s) |
Token< T > & | operator+= (const T &s) |
bool | operator== (const T &s) const |
bool | operator!= (const T &s) const |
Public Attributes | |
u32 | number |
T | string |
A token holds a string and a line number and may, for example, be used during parsing of input files.
Definition at line 42 of file token_stream.h.
|
inline |
Construct a token from a line number and a string.
[in] | n | - The line number. |
[in] | s | - The string. |
Definition at line 50 of file token_stream.h.
|
inline |
The token is implicitly cast to a string when being used instead of a string.
Definition at line 67 of file token_stream.h.
References hal::T.
|
inline |
Check if the string stored within the token is unequal to another string.
[in] | s | - The string to compare against. |
Definition at line 113 of file token_stream.h.
|
inline |
Append a string to the one stored within the token.
[in] | s | - The string to append. |
Definition at line 90 of file token_stream.h.
|
inline |
Assign a new string to the token.
[in] | s | - The new string. |
Definition at line 78 of file token_stream.h.
|
inline |
Check if the string stored within the token is equal to another string.
[in] | s | - The string to compare against. |
Definition at line 102 of file token_stream.h.
u32 hal::Token< T >::number |
The line number.
Definition at line 57 of file token_stream.h.
T hal::Token< T >::string |
The string.
Definition at line 62 of file token_stream.h.