From d4ad5921bc2522c87aba0437094fdfdfa47294d9 Mon Sep 17 00:00:00 2001 From: Marten Lohstroh Date: Fri, 17 Nov 2023 13:26:49 -0800 Subject: [PATCH 1/2] Update Cargo.toml (#45) * Update Cargo.toml * Update name string --- Cargo.toml | 2 +- src/args.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0aa938b..0585f2e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "lingua-franca" version = "0.2.0" edition = "2021" -description = "Packagemanager for Lingua-Franca" +description = "Package manager and build tool for the Lingua Franca coordination language" homepage = "https://lf-lang.org" repository = "https://github.com/lf-lang/lingo" license = "BSD-2-Clause" diff --git a/src/args.rs b/src/args.rs index 0149425..09b9bc8 100644 --- a/src/args.rs +++ b/src/args.rs @@ -124,10 +124,10 @@ pub enum Command { } #[derive(Parser)] -#[clap(name = "lingua-franca package manager and build tool")] +#[clap(name = "Lingua Franca package manager and build tool")] #[clap(author = "tassilo.tanneberger@tu-dresden.de")] #[clap(version = env!("CARGO_PKG_VERSION"))] -#[clap(about = "Build system of lingua-franca projects", long_about = None)] +#[clap(about = "Build system for the Lingua Franca coordination language", long_about = None)] pub struct CommandLineArgs { /// which command of lingo to use #[clap(subcommand)] From 67a1c2f33e61702bc46e9b22e2172a5106371190 Mon Sep 17 00:00:00 2001 From: revol-xut Date: Mon, 18 Dec 2023 19:33:46 +0100 Subject: [PATCH 2/2] renaming type-script to typescript --- src/args.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/args.rs b/src/args.rs index 0149425..3d8311d 100644 --- a/src/args.rs +++ b/src/args.rs @@ -4,6 +4,7 @@ use serde_derive::{Deserialize, Serialize}; use std::path::PathBuf; #[derive(clap::ValueEnum, Clone, Copy, Debug, Deserialize, Serialize, PartialEq)] +#[clap(rename_all = "lowercase")] pub enum TargetLanguage { C, Cpp, @@ -78,12 +79,6 @@ impl BuildArgs { } } -impl ToString for TargetLanguage { - fn to_string(&self) -> String { - format!("{:?}", self) - } -} - #[derive(Args, Debug)] pub struct InitArgs { #[clap(value_enum, short, long)] @@ -91,6 +86,7 @@ pub struct InitArgs { #[clap(value_enum, short, long, default_value_t = Platform::Native)] pub platform: Platform, } + impl InitArgs { pub fn get_target_language(&self) -> TargetLanguage { self.language.unwrap_or({ @@ -137,7 +133,7 @@ pub struct CommandLineArgs { #[clap(short, long, action)] pub quiet: bool, - /// lingo wouldn't produce any output + /// lingo will give more detailed feedback #[clap(short, long, action)] pub verbose: bool, }