Crate typst_syntax

source ·
Expand description

Parser and syntax tree for Typst.

Modules§

  • A typed layer over the untyped syntax tree.
  • Package manifest parsing.

Structs§

  • Identifies a file in a project or package.
  • An iterator over the children of a linked node.
  • A syntax node in a context.
  • A source file.
  • A unique identifier for a syntax node.
  • A value with a span locating it in the source code.
  • A syntactical error.
  • A node in the untyped syntax tree.
  • An absolute path in the virtual file system of a project or package.

Enums§

  • A syntactical building block of a Typst file.
  • A syntax highlighting tag.

Functions§

  • Determine the highlight tag of a linked syntax node.
  • Highlight a node to an HTML code element.
  • Whether a character can continue an identifier.
  • Whether a character can start an identifier.
  • Whether a string is a valid Typst identifier.
  • Whether a character is interpreted as a newline by Typst.
  • Extracts a prefix of the text that is a link and also returns whether the parentheses and brackets in the link were balanced.
  • Parses a source file.
  • Parses top-level code.
  • Parses top-level math.
  • Split text at newlines.