elm-ast 0.2.1

A syn-quality Rust library for parsing and constructing Elm 0.19.1 ASTs
Documentation
1
2
3
4
5
6
7
8
fn main() {
    let file = std::env::args()
        .nth(1)
        .expect("usage: show_compact <file.elm>");
    let source = std::fs::read_to_string(&file).expect("read file");
    let ast = elm_ast::parse(&source).expect("parse Elm source");
    print!("{}", elm_ast::print(&ast));
}