Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::detail::HighlightState Struct Reference

Trivially owned bounded state; size never depends on input/token/line length. More...

#include <document_highlight.hpp>

Public Attributes

DocumentHighlighterOptions options {}
 Immutable policy for this scanner generation.
std::uint64_t nextOffset {}
 Next required original-byte offset.
TokenRun pending {}
 Delayed token prefix or delimiter interval.
TokenRun markdownPending {}
 Delayed Markdown delimiter or close-line interval.
std::array< TokenRun, 8 > queue {}
 Constant-capacity classified output staging.
std::array< TokenRun, 8 > speculative {}
 SQL runs delayed while testing a fence close.
std::uint8_t speculativeCount {}
 Number of tentative SQL runs.
std::uint8_t queued {}
 Number of staged runs.
std::uint8_t delivered {}
 Staged runs already copied to caller storage.
std::array< char32_t, 64 > delimiter {}
 SQL tag characters, excluding dollar signs.
std::array< char, 16 > word {}
 ASCII keyword candidate, uppercased.
std::array< char, 16 > infoWord {}
 Bounded fence language candidate, lowercased.
std::array< DecodedScalar, 2 > suffix {}
 Pending numeric dot or exponent/sign.
std::uint8_t wordLength {}
 Retained ASCII keyword characters.
std::uint8_t delimiterLength {}
 Retained SQL tag characters or Markdown delimiter length.
std::uint8_t dollarMatch {}
 Matched closing dollar delimiter prefix length.
std::uint8_t suffixLength {}
 Number of delayed numeric suffix scalars.
std::uint8_t numberPhase {}
 Zero for integer, one for fraction, two for exponent digits.
std::uint16_t commentDepth {}
 Currently open nested block comments.
char32_t previous {}
 Previous comment delimiter candidate character.
char32_t runCharacter {}
 Current Markdown delimiter character.
char32_t fenceCharacter {}
 Opening fence character.
std::uint8_t runLength {}
 Current Markdown delimiter run length.
std::uint8_t fenceLength {}
 Required closing fence length.
std::uint8_t inlineLength {}
 Required inline closing backtick count.
std::uint8_t indent {}
 Source-line leading spaces seen, saturated at four.
std::uint8_t infoLength {}
 Retained fence info word length; excess is unknown/plain.
std::uint16_t parentheses {}
 SQL nesting depth used to identify COPY header direction.
HighlightSqlMode sqlMode {HighlightSqlMode::TEXT}
 SQL scanner phase.
HighlightMarkdownMode markdownMode {HighlightMarkdownMode::START}
 Markdown scanner phase.
bool escapeString {}
 True only for explicit PostgreSQL E strings.
bool escaped {}
 Next E-string scalar is escaped.
bool lineCandidate {}
 Delimiter began at a supported source line start.
bool fenced {}
 A Markdown fence is open.
bool sqlFence {}
 Current fence delegates its body to the same SQL scanner.
DocumentLanguage embeddedLanguage {DocumentLanguage::POSTGRESQL_LEXICAL}
 Recognized SQL fence language.
HighlightMySqlState mysql {}
 Fixed MySQL client/dump state.
bool capturing {}
 SQL output is currently speculative fence-close output.
bool infoStarted {}
 Fence info language word has begun.
bool infoEnded {}
 Fence language word has ended or overflowed.
bool statementStart {true}
 The next SQL word can introduce a COPY statement.
bool copyHeader {}
 A statement-start COPY header is active.
bool copyFrom {}
 A top-level COPY FROM token has been seen.
bool copyStdin {}
 COPY FROM STDIN was recognized outside parentheses.
bool copyAwaitLine {}
 Header semicolon was seen; next newline begins literal data.
bool copyHeaderCr {}
 A header CR was admitted; an immediately following LF is still header whitespace.
bool eofFinalized {}
 No further input may be admitted.

Detailed Description

Trivially owned bounded state; size never depends on input/token/line length.


The documentation for this struct was generated from the following file: