juicebox 0.1.0

A simple, yet advanced programming language
/*
 * lib/args.rs
 *
 * Copyright (C) 2024 Max Walters
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
 */

use clap::{ Args as _Args, Parser, Subcommand };

#[derive(Parser)]
#[command(name = "juicebox")]
#[command(author = "Max Walters <mdwalters.pm@proton.me>")]
#[command(version = "0.1.0")]
#[command(about = "A simple, yet advanced programming language.", long_about = None)]
pub struct Args {
    /// Set the file output name
    #[arg(short, long)]
    output: Option<String>,

    #[command(subcommand)]
    command: Commands,

    /// The files to compile
    files: Option<std::path::PathBuf>,
}


#[derive(Subcommand)]
enum Commands {
    /// Starts the LSP
    LSP(LSP),

    /// Formats the specified Juicebox files
    Format(Format),
}

#[derive(_Args)]
struct LSP {
    name: Option<String>,
}

#[derive(_Args)]
struct Format {
    files: String,
}