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§
Structs§
- Attribute
- An attribute attached to a declaration:
@deprecated(since: "0.8"). - Attribute
Arg - A single argument to an attribute. Positional args have
name = None; named args usename: Some("key"). Values are restricted to literal expressions by the parser (string/int/float/bool/nil/identifier). - Dict
Entry - Dict
Pattern Field - A field in a dict destructuring pattern.
- Enum
Variant - An enum variant declaration.
- Interface
Method - An interface method signature.
- List
Pattern Element - An element in a list destructuring pattern.
- Match
Arm - Parser
- Recursive descent parser for Harn.
- Select
Case - Shape
Field - A field in a dict shape type.
- Spanned
- A node wrapped with source location information.
- Struct
Field - A struct field declaration.
- Type
Param - A generic type parameter on a function or pipeline declaration.
- Typed
Param - A parameter with an optional type annotation and optional default value.
- Where
Clause - A where-clause constraint on a generic type parameter.
Enums§
- Binding
Pattern - A binding pattern for destructuring in let/var/for-in.
- Node
- AST nodes for the Harn language.
- Parallel
Mode - Parallel execution mode.
- Parser
Error - Parser errors.
- Pipeline
Error - Error from a source processing pipeline stage. Wraps the inner error types so callers can dispatch on the failing stage.
- Type
Expr - A type annotation (optional, for runtime checking).
- Variance
- Declared variance of a generic type parameter.
Functions§
- check_
source - Lex, parse, and type-check source. Returns the AST and any type diagnostics (which may include warnings even on success).
- check_
source_ strict - Lex, parse, and type-check, bailing on the first type error.
- is_
known_ builtin - Returns
trueifnameis a builtin recognized by the parser’s static analyzer. - known_
builtin_ metadata - known_
builtin_ names - Every builtin name known to the parser, alphabetically. Enables bidirectional drift checks against the VM’s runtime registry.
- parse_
source - Lex and parse source into an AST.
- peel_
attributes - If
nodeis anAttributedDecl, returns(attrs, inner); otherwise returns an empty attribute slice and the node itself. Use at the top of any consumer that processes top-level statements so attributes flow through transparently. - spanned
- Helper to wrap a node with a span.
Type Aliases§
- SNode
- A spanned AST node — the primary unit throughout the compiler.