Compiler Design Documents

This folder contains design documents and other musings created as part of the development of Feersum. The documents aren’t guaranteed to be up to date, accurate, or even useful.

Syntax Trees

The syntax trees used in the parsing stage in Feersum are based on the idea of Red / Green trees. Low level green nodes contain no position information. Higher level red nodes add ofsets and parent pointers to provide the full concrete syntax tree. We then provide a third layer built on top of this red tree in the Feersum.Syntax.Tree module. Each node in this tree provides a typed, lazy, and fault-tolerant view over the underlying tree.

For move information about the underlying syntax trees, as well as a discussion about the implementation in Firethorn, the library that Feersum uses, check out this blog post.

Last updated: 2026-03-09