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
- Display
Node - One node of a provisional display tree. Spans are byte offsets into the
received text after the same UTF-8 repair
crate::parse_bytesapplies: each maximal invalid byte subsequence becomes one U+FFFD. - Document
- Node
- Prop
- Reference
- Revision
- A provisional picture of a streaming reply.
- Scan
Result - Span
- Original UTF-8 byte offsets, including a leading BOM if one was supplied.
- Stream
Parser - Parses a source that arrives in chunks.
- Work
- The work one
StreamParser::feedcall 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§
- Diagnostic
Code - A diagnostic’s stable code. New codes may be added in minor releases, so
a
matchneeds a wildcard arm;DiagnosticCode::as_strgives the code as it is written in documentation and logs, such asE_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
tokenargument 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