parse_chord_progression_string

Function parse_chord_progression_string 

Source
pub fn parse_chord_progression_string(
    input: &str,
) -> Result<Vec<Section>, ErrorInfoWithPosition>
Expand description

Parse a chord progression string and return the AST

§Example

use chord_progression_parser::parse_chord_progression_string;

let input: &str = "
@section=Intro
|[key=E]E|C#m(7)|Bm(7)|C#(7)|
|F#m(7)|Am(7)|F#(7)|B|

@section=Verse
|E|C#m(7)|Bm(7)|C#(7)|
|F#m(7)|Am(7)|F#(7)|B|
";
     
let result = parse_chord_progression_string(input);
println!("{:#?}", result);

§Panics

Panics if unhandled error occurs.