wdl-ast 0.16.0

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

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:

# let source = "version 1.1\nworkflow test {}";
use wdl_ast::Document;

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