Skip to content

Concrete syntax tree (CST)

Status: open/active · Aliases: CST, lossless CST

A parse tree that keeps every token from the source — whitespace, markers, escapes, comments — not just semantic structure (an AST keeps only meaning). The full source is recoverable by concatenating the tree’s leaves in order, so a parse→serialize cycle with no edits is byte-identical. Losslessness is a property of the tree, not the parser: it cannot be retrofitted onto an AST that discarded the bytes.


← Back to the Glossary