Skip to content

Pipeline: Tree traversal

Giorgio Garofalo edited this page Apr 30, 2025 · 6 revisions

← Back to Pipeline

Tree traversal

Main packages: core.ast.iterator, core.context.hooks

After the function calls have been expanded, the AST is traversed depth-first to gather enriched information about the document, such as:

  • Heading hierarchy, used for the table of contents;
  • Numbering: each heading, figure, and others is assigned a unique number based on its location in the heading hierarchy;
  • Link definition bound to each link reference;

For clear performance reasons, only one traversal is performed during this stage. Each operation can however act independently by attaching its own hook to the tree iterator, which is triggered when nodes of a certain kind are encountered.

See next: Rendering

Documentation

CLI tools

Markdown enhancements

Functions

Setting up

Multi-file projects

Layout

Charts & diagrams

Scripting & control flow

Utilities

Slides

I/O

Value types

Built-in libraries

  • Paper: abstract, definitions, theorems, and more

Native content

Extra features

Inside Quarkdown

Clone this wiki locally