Function glicol_parser::get_ast

source ·
pub fn get_ast(code: &str) -> Result<GlicolAst, Error<Rule>>
Examples found in repository?
examples/choose.rs (line 5)
4
5
6
fn main() {
    println!("{:?}", get_ast("o: choose 60 50 80 70"));
}
More examples
Hide additional examples
examples/pattern.rs (line 5)
4
5
6
fn main() {
    println!("{:?}", get_ast(r#"o: sig "60@0.0 72@0.5"(1)"#));
}
examples/seq.rs (line 4)
3
4
5
fn main() {
    println!("{:?}", get_ast("o: seq 60 _60 __60 ~a >> mul 0.5"));
}
examples/psampler.rs (line 5)
4
5
6
fn main() {
    println!("{:?}", get_ast(r#"o: psampler "'bd'@0.0 'sd'@0.5""#));
}
examples/test.rs (line 6)
5
6
7
8
9
10
11
fn main() {
    println!("{:?}", get_ast(r#"o: lpf "400@0.5 600@0.9"(1) 1"#));
    // get_ast(input);
    // let line = GlicolParser::parse(Rule::block, input);
    // println!("{:?}", line);
    // }
}
examples/hello.rs (line 6)
5
6
7
8
9
10
11
12
13
fn main() {
    println!("{:?}", get_ast("a: [0.1 => 0.2, 1/2 - 100_ms => 0.3]"));
    // println!("{:?}", get_ast("o: arrange ~t1 1 ~t2 3"));
    // println!("{:?}", get_ast("o: envperc 1.0 2.0"));
    // get_ast(input);
    // let line = GlicolParser::parse(Rule::block, input);
    // println!("{:?}", line);
    // }
}