A mode transition, fired when its rule wins, acting on the scan's mode stack: enter a nested mode, leave the current one, or replace it.
More...
#include <lexer.hpp>
|
| op | operation |
| | Which transition to perform.
|
| |
| std::string | target {} |
| | The mode push/set enters; ignored (and omittable) for pop.
|
| |
| std::size_t | target_id {0} |
| | The interned id of target, resolved once when the lexer is built (see scilex::lexer::build_dispatch) so the per-token transition is a field read, not a name→id map lookup. Internal cache: a caller leaves it at 0 and sets only target; pop leaves it unused.
|
| |
A mode transition, fired when its rule wins, acting on the scan's mode stack: enter a nested mode, leave the current one, or replace it.
Definition at line 63 of file lexer.hpp.
◆ op
The kind of transition.
| Enumerator |
|---|
| push | Enter target, remembering the mode below it (a nested context).
|
| pop | Leave the current mode, returning to the one beneath it.
|
| set | Replace the current mode with target (stack depth unchanged).
|
Definition at line 66 of file lexer.hpp.
◆ operation
| op scilex::mode_action::operation |
Which transition to perform.
Definition at line 73 of file lexer.hpp.
◆ target
| std::string scilex::mode_action::target {} |
The mode push/set enters; ignored (and omittable) for pop.
Definition at line 74 of file lexer.hpp.
◆ target_id
| std::size_t scilex::mode_action::target_id {0} |
The interned id of target, resolved once when the lexer is built (see scilex::lexer::build_dispatch) so the per-token transition is a field read, not a name→id map lookup. Internal cache: a caller leaves it at 0 and sets only target; pop leaves it unused.
Definition at line 80 of file lexer.hpp.
The documentation for this struct was generated from the following file: