|
TextMateLib 1.0
Modern C++ implementation of the TextMate syntax highlighting engine
|
Abstract interface representing the parsing state at the end of a line. More...
#include </home/runner/work/TextMateLib/TextMateLib/packages/tml-cpp/src/types.h>
Inherited by tml::StateStackImpl.
Public Member Functions | |
| virtual int | getDepth () const =0 |
| Get the nesting depth (number of active rules) | |
| virtual StateStack * | clone ()=0 |
| Create an independent copy of this state. | |
| virtual bool | equals (StateStack *other)=0 |
| Check if this state equals another (for incremental tokenization) | |
Abstract interface representing the parsing state at the end of a line.
StateStack is immutable and encodes the hierarchy of active grammar rules after parsing a line. Two StateStacks are equal() if and only if parsing can resume from the exact same position (all scopes and nesting are identical). This enables incremental tokenization optimization: if prevState equals previousLine's ruleStack, the line's tokens may not have changed (early stopping).
|
pure virtual |
Create an independent copy of this state.
|
pure virtual |
Check if this state equals another (for incremental tokenization)
| other | StateStack to compare with |
|
pure virtual |
Get the nesting depth (number of active rules)