compose_parser 2.1.0

Rust parser created to parse the Jetpack Compose Text and Images
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::cli::Cli;

mod cli;

fn main() -> anyhow::Result<()> {
    let args: Vec<String> = std::env::args().collect();
    let cli = Cli::parse(&args);

    match cli {
        Cli::Help => Cli::parse_command_help(),
        Cli::Author => Cli::parse_command_author(),
        Cli::File(file) => Cli::parse_command_file(file.as_str()),
        Cli::Unknown(command) => Cli::parse_command_unknown(command),
        Cli::Empty => Cli::parse_command_empty(),
    }

    Ok(())
}