![]() |
OpenMS
|
A single token from the input stream. More...
#include <OpenMS/CHEMISTRY/ProFormaTokenizer.h>
Public Member Functions | |
| bool | isEnd () const |
| Check if this is an end-of-input token. | |
| bool | is (TokenType t) const |
| Check if this token is a specific single-character type. | |
Public Attributes | |
| TokenType | type |
| The type of this token. | |
| std::string_view | text |
| View into the original input (zero-copy) | |
| size_t | position |
| Byte offset in the original input (0-indexed) | |
A single token from the input stream.
Tokens store their type, a view of the original text, and the byte position in the input for error reporting.
|
inline |
Check if this token is a specific single-character type.
|
inline |
Check if this is an end-of-input token.
| size_t position |
Byte offset in the original input (0-indexed)
| std::string_view text |
View into the original input (zero-copy)
| TokenType type |
The type of this token.