|
Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
|
#include <document_highlight.hpp>
Public Member Functions | |
| DocumentHighlighter (DocumentHighlighterOptions options={}, std::uint64_t initialByteOffset=0) noexcept | |
| DocumentHighlighter (const DocumentHighlightCheckpoint &checkpoint) noexcept | |
| DocumentHighlightResult | feed (std::span< const DecodedScalar > input, std::span< TokenRun > output, bool endOfInput=false) noexcept |
| DocumentHighlightCheckpoint | checkpoint () const noexcept |
| std::uint64_t | nextByteOffset () const noexcept |
Worker-side, allocation-free streaming lexical projection. Single-owner mutation only; copied checkpoints can be transferred between workers. No views, controls, source owners or callbacks are retained. Cancellation belongs between bounded feed calls. Checkpoints must be source-qualified by the caller.
|
explicitnoexcept |
Establish a proven initial lexical boundary.
| options | Explicit profile and bounded processing policy. |
| initialByteOffset | Original-byte position at a known initial lexical context; nonzero is an assertion by the caller, never inferred cold-seek recovery. |
|
explicitnoexcept |
Restore all owned scanner state without inspecting or retaining source bytes.
| checkpoint | State previously qualified against the caller's current source, revision, decoding policy and language profile. |
|
noexcept |
Capture delayed prefixes and staged output as an owning fixed-size value.
|
noexcept |
Process a bounded step; retry with unconsumed input and persistent EOF assertion.
| input | Consecutive decoded scalars borrowed only for this call. |
| output | Caller-owned storage borrowed only for this call; zero capacity can yield OUTPUT_FULL without progress and must be enlarged before retrying. |
| endOfInput | True only when the supplied suffix ends at confirmed source EOF. |
|
noexcept |
Inspect the exact scalar admission boundary.