Skip to main content Crate harn_parser Copy item path Source pub use typechecker::block_definitely_exits ;pub use typechecker::format_type ;pub use typechecker::stmt_definitely_exits ;pub use typechecker::DiagnosticDetails ;pub use typechecker::DiagnosticSeverity ;pub use typechecker::InlayHintInfo ;pub use typechecker::TypeChecker ;pub use typechecker::TypeDiagnostic ;diagnostic typechecker Attribute An attribute attached to a declaration: @deprecated(since: "0.8"). AttributeArg A single argument to an attribute. Positional args have name = None;
named args use name: Some("key"). Values are restricted to literal
expressions by the parser (string/int/float/bool/nil/identifier). DictEntry DictPatternField A field in a dict destructuring pattern. EnumVariant An enum variant declaration. HitlArg A single argument in a Node::HitlExpr call. name is Some when
the caller used named-arg syntax (e.g. quorum: 2); positional
arguments leave it as None and rely on the kind’s parameter order. 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. BindingPattern A binding pattern for destructuring in let/var/for-in. HitlKind First-class human-in-the-loop primitive. Node AST nodes for the Harn language. ParallelMode Parallel execution mode. ParserError Parser errors. PipelineError Error from a source processing pipeline stage. Wraps the inner error
types so callers can dispatch on the failing stage. TypeExpr A type annotation (optional, for runtime checking). Variance Declared variance of a generic type parameter. 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_discard_name _ is the discard binding name in let/var/destructuring positions.is_known_builtin Returns true if name is 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 node is an AttributedDecl, 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. SNode A spanned AST node — the primary unit throughout the compiler.