Expand description
Multi-language syntax validation for Attested Computations and embedded scripts.
Provides fast syntax checking for Python, JavaScript, TypeScript, Rust, SQL, JSON, YAML, and Bash using pure Rust AST parsers.
§Cargo features
The third-party parsers are optional, each behind a feature of the same name (all on by default):
| Feature | Languages | Parser crate |
|---|---|---|
python | Python | rustpython-parser |
javascript | JavaScript, TypeScript | oxc_parser |
rust | Rust | syn |
sql | SQL | sqlparser |
JSON, YAML, and Bash checking is built in and always available. With a
feature disabled, check_syntax accepts that language unchecked (it
returns Ok(()), as for an unknown tag) and Language::is_supported
reports false for it. The python feature is the one worth knowing
about: rustpython-parser brings in the LGPL-3.0-only malachite crates,
which an allow-list licence policy will typically reject.
Structs§
- Fenced
Code Block - A parsed fenced code block from markdown.
- Syntax
Error - A syntax diagnostic produced by static AST parsing.
Enums§
- Language
- Supported languages for static syntax checking.
Functions§
- check_
syntax - Checks the syntax of
sourcefor the givenlanguagetag or name. - extract_
fenced_ code_ blocks - Extracts all fenced code blocks (delimited by 3+ backticks or 3+ tildes) from markdown text.