pub fn execute_stage_pub(
doc: &Document,
stage_name: &str,
input: &str,
) -> Result<String>Expand description
Public alias for diagnostics and tests.
Examples found in repository?
examples/dbg-run.rs (line 19)
4fn main() {
5 let rt = Runtime::new(vec![
6 "../maps/maps".into(),
7 "../maps/libs".into(),
8 ]);
9 let doc = rt.load("alalc-ben-Beng-Latn-2017").unwrap();
10 println!("deps declared: {:?}", doc.dep_aliases.keys().collect::<Vec<_>>());
11 for (name, stage) in &doc.stages {
12 for item in &stage.items {
13 if let StageItem::Run { dep, stage, .. } = item {
14 println!("stage {name}: run dep={dep:?} stage={stage:?}");
15 }
16 }
17 }
18 let un = rt.load("un-ben-Beng-Latn-2016").unwrap();
19 let out = interscript_rs::interpreter::execute_stage_pub(&un, "main", "ত্য");
20 println!("un-ben direct: {:?}", out);
21}