Skip to main content

Crate cortexkit_rich_ui_syntax

Crate cortexkit_rich_ui_syntax 

Source
Expand description

A bounded syntax front end for rich UI language v1.

Reference discovery walks the returned syntax tree; it never scans strings from data, Markdown destinations, or failed tags a second time.

Structs§

Diagnostic
DisplayNode
One node of a provisional display tree. Spans are byte offsets into the received text after the same UTF-8 repair crate::parse_bytes applies: each maximal invalid byte subsequence becomes one U+FFFD.
Document
Node
Prop
Reference
Revision
A provisional picture of a streaming reply.
ScanResult
Span
Original UTF-8 byte offsets, including a leading BOM if one was supplied.
StreamParser
Parses a source that arrives in chunks.
Work
The work one StreamParser::feed call did, as plain counts. The caller does its own fuel accounting: it reserves part of a reply’s budget for the final parse and charges provisional work separately.

Enums§

DiagnosticCode
A diagnostic’s stable code. New codes may be added in minor releases, so a match needs a wildcard arm; DiagnosticCode::as_str gives the code as it is written in documentation and logs, such as E_SYNTAX.
Display
What a provisional display node draws.
Expression
Kind
Markdown
Mode
Which grammar a source follows.

Constants§

AST_NODES
BLOCKS
DECLARATIONS
DIAGNOSTICS
DIALECT
Identifies the rich UI source dialect accepted by this parser.
EMPHASIS_DEPTH
EXPRESSION_DEPTH
HANDLES
MARKDOWN_DEPTH
OUTPUT_SCALARS
PENDING_REFERENCE_CHARS
The most characters a possible $$tc(N) reference may hold before it is drawn as a provisional literal. This is a streaming threshold, not a limit on reference numbers: the final parse accepts any length.
PROGRAM_BYTES
REFERENCES
REPLY_BYTES
STREAM_CONTEXT_BYTES
The most source bytes one unresolved provisional context may hold: a code span, a link, a whole tag, a table header line, or a line start that may still become a block marker. At this size the held text is drawn as a provisional literal and dropped. Final parsing has no such threshold.
TAG_DEPTH
TAG_OPENING_BYTES
The most source bytes a tag’s opening (<Name …>) may hold before it is drawn as a provisional literal.

Functions§

check_token_slot
Checks a token argument slot without trimming, unescaping, or substring search.
parse
parse_bytes
Invalid UTF-8 is replaced before parsing; offsets refer to the repaired text. The size limit measures the raw input bytes, before repair. Each maximal invalid subsequence (one to three bytes) becomes one three-byte U+FFFD, so repaired text is never shorter than the input and may be longer than the limit; an input within the limit is never refused for it.
scan_references