shiki_flutter_engine_interface library
The pluggable regex-engine seam shared by shiki_flutter and its engine
backends, mirroring vscode-textmate's onigLib.ts / IOnigLib and Shiki's
JavaScript scanner.ts.
An engine is anything that can build an OnigScanner and an OnigString:
that pair is the entire contract the TextMate tokenizer runs on.
shiki_flutter ships a pure-Dart implementation; other packages plug in a
native (FFI Oniguruma) or ported (oniguruma_dart) backend by implementing
ShikiHighlighterEngine. Keeping the contract in this tiny, dependency-free
package lets every implementation share one set of types and interoperate.
Classes
- OnigCaptureIndex
-
A captured range within a match. Mirrors
IOnigCaptureIndex. - OnigMatch
-
The result of OnigScanner.findNextMatch. Mirrors
IOnigMatch. - OnigScanner
- Scans a line for the earliest match among a set of patterns.
- OnigString
-
Wraps a string being scanned. Mirrors
OnigString. - ShikiHighlighterEngine
-
Factory for scanners and strings: the pluggable engine seam. Mirrors
vscode-textmate'sIOnigLib.
Constants
- kUnmatchedOffset → const int
- Sentinel used for capture groups that did not participate in a match.