Module ast

Source
Expand description

§Fully‑typed Abstract Syntax Tree (AST) for CommonMark + GitHub Flavored Markdown (GFM)

This module models every construct described in the CommonMark 1.0 specification together with the widely‑used GFM extensions: tables, strikethrough, autolinks, task‑list items and footnotes.

The design separates block‑level and inline‑level nodes because parsers and renderers typically operate on these tiers independently.

Document ─┐
          └─ Block ─┐
                    ├─ Inline
                    └─ ...

Structs§

CodeBlock
Fenced or indented code block.
Document
Root of a Markdown document
FootnoteDefinition
Heading
Heading with level 1–6 and inline content.
Link
Re‑usable structure for links and images (destination + children).
LinkDefinition
Link reference definition (GFM) with a label, destination and optional title.
LinkReference
List
A list container — bullet or ordered.
ListItem
Item within a list.
ListOrderedKindOptions
Specifies what kind of list we have.
Table
A table is a collection of rows and columns with optional alignment. The first row is the header row.

Enums§

Alignment
Specifies the alignment of a table cell.
Block
Block‑level constructs in the order they appear in the CommonMark spec.
CodeBlockKind
The concrete kind of a code block.
HeadingKind
Heading with level 1–6 and inline content.
Inline
ListBulletKind
Concrete bullet character used for a bullet list.
ListKind
Specifies what kind of list we have.
SetextHeading
Setext heading with level and underline type.
TaskState
State of a task‑list checkbox.

Type Aliases§

TableCell
A table cell is a vector of inlines (text, links, etc.).
TableRow
A table row is a vector of cells (columns).