10 breaking releases
new 0.11.0 | Jan 17, 2025 |
---|---|
0.10.0 | Oct 22, 2024 |
0.9.0 | Oct 16, 2024 |
0.6.0 | Jul 17, 2024 |
0.1.0 | Nov 22, 2023 |
#315 in Biology
117 downloads per month
Used in 8 crates
(2 directly)
235KB
5.5K
SLoC
Lexing and parsing for Workflow Description Language (WDL) documents.
This crate implements an infallible WDL parser based
on the logos
crate for lexing and the rowan
crate for
concrete syntax tree (CST) representation.
The parser outputs a list of parser events that can be used to construct the CST; the parser also keeps a list of [Diagnostic]s emitted during the parse that relate to spans from the original source.
See SyntaxTree::parse for parsing WDL source; users may inspect the resulting CST to determine the version of the document that was parsed.
Examples
An example of parsing WDL source into a CST and printing the tree:
use wdl_grammar::SyntaxTree;
let (tree, diagnostics) = SyntaxTree::parse("version 1.1");
assert!(diagnostics.is_empty());
println!("{tree:#?}");
Dependencies
~3–10MB
~76K SLoC