One token: what it is, where it is, and what it holds.
More...
#include <cpp/a11/flow/token.h>
|
| bool | IsWord () const |
| |
| bool | EndsStatement () const |
| | Whether a line break, a } or the end of the file is here: the three ways a statement can end.
|
| |
One token: what it is, where it is, and what it holds.
text borrows the source, so a token lives no longer than the text it was lexed from – which is how every caller uses it: lex, use, discard.
◆ EndsStatement()
| bool a11::flow::Token::EndsStatement |
( |
| ) |
const |
|
inline |
Whether a line break, a } or the end of the file is here: the three ways a statement can end.
◆ IsWord()
| bool a11::flow::Token::IsWord |
( |
| ) |
const |
|
inline |
◆ column
| int a11::flow::Token::column = 1 |
◆ duration
| absl::Duration a11::flow::Token::duration |
◆ end
| size_t a11::flow::Token::end = 0 |
◆ is_integer
| bool a11::flow::Token::is_integer = false |
◆ kind
◆ line
| int a11::flow::Token::line = 1 |
1-based, as a11.flow.lexer has always reported them.
◆ number
| double a11::flow::Token::number = 0.0 |
A kNumber's value.
is_integer says whether it was written without a fractional part, which is what the counted forms of the grammar require.
◆ start
| size_t a11::flow::Token::start = 0 |
◆ string_value
| std::string a11::flow::Token::string_value |
A kString's value, with escapes resolved.
◆ text
| std::string_view a11::flow::Token::text |
The source slice, exactly as written.
The documentation for this struct was generated from the following file: