Skip to main content Crate harn_parser Copy item path Source pub use diagnostic_codes::Category as DiagnosticCodeCategory;pub use diagnostic_codes::Code as DiagnosticCode;pub use diagnostic_codes::ParseRepairSafetyError ;pub use diagnostic_codes::Repair ;pub use diagnostic_codes::RepairId ;pub use diagnostic_codes::RepairSafety ;pub use diagnostic_codes::RepairTemplate ;pub use diagnostic_codes::REPAIR_REGISTRY ;pub use stdlib_metadata::parse_for_span as parse_stdlib_metadata;pub use stdlib_metadata::StdlibMetadata ;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 ;ast_json Stable JSON projections for parser-facing tooling. builtin_signatures Single source of truth for builtin function signatures used by the parser
and runtime VM: identifier resolution, typo suggestions, return-type
inference, static arity & per-arg type checks, runtime arity & type
enforcement, and lint awareness all consult the registry returned by
all_signatures . diagnostic diagnostic_codes Stable diagnostic code registry. stdlib_metadata Structured metadata declared in stdlib HarnDoc blocks. typechecker visit Generic AST visitor used by the linter, formatter, and any other
crate that needs to walk every SNode in a parsed program. 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
compile-time metadata expressions by the parser (literal scalars,
identifiers, lists, dicts, and call-shaped sentinels). 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.