Laurel User Guide

3.3. Sources🔗

All AST nodes can carry a source location via the AstNode wrapper.

🔗structure
Strata.Laurel.AstNode (t : Type) : Type
Strata.Laurel.AstNode (t : Type) : Type

A wrapper that pairs a value with source-level metadata such as source locations and annotations. All Laurel AST nodes are wrapped in AstNode so that error messages and verification conditions can refer back to the original source.

Constructor

Strata.Laurel.AstNode.mk

Fields

val : t

The wrapped value.

source : Strata.FileRange

Source location for this AST node.