Expand description
Compile a Rule into a runnable matcher and run it against source.
The atomic tier supports three matcher forms, all reduced to a single
RuleMatch stream:
pattern→ compiled to a tree-sitter query viacrate::pattern.kind→ the trivial query(<kind>) @__match.regex→ a text regex over the source, yielding spans with no AST metavar bindings.
Structs§
- Binding
- A metavariable binding: the captured text plus where it lives.
- Binding
Metadata - Semantic metadata for a Harn capture. Populated for Harn sources when the engine can resolve the captured node to a local declaration/binding or infer a simple static type.
- Codemod
Result - The result of applying a codemod rule’s
fixto a source string. - Compiled
Rule - A rule whose matcher has been compiled and is ready to run.
- Diagnostic
- A diagnostic produced by running a rule — the mapping surface onto the
linter’s
LintDiagnostic/FixEdit(Epic C / the LSP reuse this). - Resolved
Binding - A resolved Harn declaration or binding identity.
- Rule
Match - One match of a rule against a file.
- Span
- A byte + row/col span. Rows/cols are 0-based, matching the rest of the Harn AST wire format.