Expand description
Blends imperative shell: language detection, tree-sitter parsing, AST-graph
construction, and canonical-JSON serialization. It wraps the pure domain and
is the crate published as fluidattacks-blends.
Re-exports§
pub use blends_domain as domain;
Structs§
- Content
- A source file’s bytes, decoded text, detected language and path.
- Parse
Error - The grammar for the content’s language could not be loaded, or the parsed tree contains a syntax error.
- SvgRender
Error - Why rendering a graph to SVG failed: Graphviz is missing, failed, or the output could not be written. The message is ready to display as-is.
Enums§
- Language
- A source language this crate has a syntax-graph dispatcher for.
Traits§
- Language
Ext - Shell-side operations on the domain
Languageenum: path detection and the tree-sitter grammar bindings domain cannot depend on (it isno_std).
Functions§
- get_
ast_ graph - Parses
contentand walks the resulting tree into anAstGraph. - get_
graphs_ from_ path - Parses the file at
pathand builds every graph layer it supports. - get_
stack_ graph - Builds
syntax_graph’s stack graph, naming the file’s module by its path underroot;Nonewhen the file is not underroot. - get_
syntax_ graph - Builds
ast_graph’s syntax graph and applies the CFG overlay. - parse
- Parses
contentwith the tree-sitter grammar of its language. - render_
graph_ set - Renders each present graph as
<output_prefix>.ast.svgand<output_prefix>.syntax_graph.svg. Absent layers are skipped.