10 breaking releases

new 0.10.0 Jan 17, 2025
0.9.0 Oct 22, 2024
0.8.0 Oct 16, 2024
0.5.0 Jul 17, 2024
0.1.0 Dec 17, 2023

#143 in Programming languages

Download history 63/week @ 2024-09-27 33/week @ 2024-10-04 285/week @ 2024-10-11 307/week @ 2024-10-18 45/week @ 2024-10-25 42/week @ 2024-11-01 140/week @ 2024-11-08 79/week @ 2024-11-15 131/week @ 2024-11-22 28/week @ 2024-11-29 47/week @ 2024-12-06 90/week @ 2024-12-13 21/week @ 2024-12-20 4/week @ 2024-12-27 52/week @ 2025-01-03 24/week @ 2025-01-10

113 downloads per month
Used in 7 crates (5 directly)

MIT/Apache

1MB
19K SLoC

An abstract syntax tree for Workflow Description Language (WDL) documents.

The AST implementation is effectively a facade over the concrete syntax tree (CST) implemented by [SyntaxTree] from wdl-grammar.

An AST is cheap to construct and may be cheaply cloned at any level.

However, an AST (and the underlying CST) are immutable; updating the tree requires replacing a node in the tree to produce a new tree. The unaffected nodes of the replacement are reused from the old tree to the new tree.

Examples

An example of parsing a WDL document into an AST and validating it:

use wdl_ast::Document;
use wdl_ast::Validator;

let (document, diagnostics) = Document::parse(source);
if !diagnostics.is_empty() {
    // Handle the failure to parse
}

let mut validator = Validator::default();
if let Err(diagnostics) = validator.validate(&document) {
    // Handle the failure to validate
}

Dependencies

~6–14MB
~145K SLoC