9#ifndef SCILEX_TOKEN_HPP
10#define SCILEX_TOKEN_HPP
26 inline constexpr int end_of_input {std::numeric_limits<int>::min()};
37 inline constexpr int error {std::numeric_limits<int>::min() + 4};
The SciLex public API (scilex::lexer, scilex::rule, scilex::token).
constexpr int error
Reserved token kind for a lexical-error run under scilex::error_policy::token.
constexpr int end_of_input
Reserved token kind for the synthetic end-of-input token.
A location in the source text.
std::size_t offset
0-based byte offset from the start of the source.
std::size_t column
1-based byte column within the line.
std::size_t line
1-based line number.
One lexical token: a typed slice of the source.
int kind
Caller-defined token kind (e.g. an enum value).
std::size_t mode_id
The mode this token was lexed in (0 = the default/root mode).
std::string_view lexeme
The matched text, viewing into the source.
position start
Position of the token's first byte.