Skip to main content

Crate harn_parser

Crate harn_parser 

Source

Re-exports§

pub use typechecker::block_definitely_exits;
pub use typechecker::format_type;
pub use typechecker::stmt_definitely_exits;
pub use typechecker::DiagnosticSeverity;
pub use typechecker::InlayHintInfo;
pub use typechecker::TypeChecker;
pub use typechecker::TypeDiagnostic;

Modules§

diagnostic
typechecker

Structs§

DictEntry
DictPatternField
A field in a dict destructuring pattern.
EnumVariant
An enum variant declaration.
InterfaceMethod
An interface method signature.
ListPatternElement
An element in a list destructuring pattern.
MatchArm
Parser
Recursive descent parser for Harn.
SelectCase
ShapeField
A field in a dict shape type.
Spanned
A node wrapped with source location information.
StructField
A struct field declaration.
TypeParam
A generic type parameter on a function or pipeline declaration.
TypedParam
A parameter with an optional type annotation and optional default value.
WhereClause
A where-clause constraint on a generic type parameter.

Enums§

BindingPattern
A binding pattern for destructuring in let/var/for-in.
Node
AST nodes for the Harn language.
ParallelMode
Parallel execution mode.
ParserError
Parser errors.
TypeExpr
A type annotation (optional, for runtime checking).

Functions§

is_known_builtin
Returns true if name is a builtin recognized by the parser’s static analyzer. Exposed for cross-crate drift tests (see crates/harn-vm/tests/builtin_registry_alignment.rs) and any future tooling that needs to validate builtin references without running the VM.
known_builtin_metadata
known_builtin_names
Iterator over every builtin name known to the parser, in alphabetical order. Enables bidirectional drift checks against the VM’s runtime registry — a parser entry with no runtime counterpart means a stale signature that should be removed.
spanned
Helper to wrap a node with a span.

Type Aliases§

SNode
A spanned AST node — the primary unit throughout the compiler.