Expand description
Parser and syntax tree for Typst.
Modules§
Structs§
- FileId
- Identifies a file in a project or package.
- Linked
Children - An iterator over the children of a linked node.
- Linked
Node - A syntax node in a context.
- Source
- A source file.
- Span
- A unique identifier for a syntax node.
- Spanned
- A value with a span locating it in the source code.
- Syntax
Error - A syntactical error.
- Syntax
Node - A node in the untyped syntax tree.
- Virtual
Path - An absolute path in the virtual file system of a project or package.
Enums§
- Side
- Indicates whether the cursor is before the related byte index, or after.
- Syntax
Kind - A syntactical building block of a Typst file.
- Tag
- A syntax highlighting tag.
Functions§
- highlight
- Determine the highlight tag of a linked syntax node.
- highlight_
html - Highlight a node to an HTML
code
element. - is_
id_ continue - Whether a character can continue an identifier.
- is_
id_ start - Whether a character can start an identifier.
- is_
ident - Whether a string is a valid Typst identifier.
- is_
newline - Whether a character is interpreted as a newline by Typst.
- is_
valid_ label_ literal_ id - Returns true if this string is valid in a label literal.
- link_
prefix - Extracts a prefix of the text that is a link and also returns whether the parentheses and brackets in the link were balanced.
- parse
- Parses a source file.
- parse_
code - Parses top-level code.
- parse_
math - Parses top-level math.
- split_
newlines - Split text at newlines. These newline characters are not kept.