Skip to main content

Module ast

Module ast 

Source
Expand description

Lossless AST node types produced by the parser. Typed, lossless parse tree produced by the recursive-descent parser (src/parse.rs).

Every node carries a source position and byte span. Downstream crates consume this tree directly: daml-fmt re-prints layout from the spans, and daml-lint lowers it onto its own rule-facing IR.

Re-exports§

pub use crate::lexer::Identifier;
pub use crate::lexer::ModuleName;
pub use crate::lexer::Operator;
pub use crate::lexer::Pos;

Structs§

Alt
Binding
ChoiceDecl
Equation
FieldAssign
FieldDecl
FunctionDecl
ImportDecl
InterfaceDecl
InterfaceInstanceDecl
Module
ParseDiagnostic
Parse diagnostic — never fatal; the scan continues.
Span
Byte span of an AST node.
TemplateDecl

Enums§

Consuming
Decl
DiagnosticCategory
Why a ParseDiagnostic fired.
DoStmt
Expr
ImportStyle
Import syntax style.
LitKind
Pat
SectionSide
Side of an operator section.
TemplateBodyDecl
Type
Structured Daml type, parsed from the real token stream.