Loading tools/pdl/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ rust_defaults { "libquote", "libserde", "libserde_json", "libstructopt", "libclap", "libsyn", "libtempfile", ], Loading tools/pdl/Cargo.toml +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ proc-macro2 = "*" quote = "*" serde = { version = "*", features = ["default", "derive", "serde_derive", "std"] } serde_json = "*" structopt = "*" clap = { version = "*", features = ["derive"] } syn = "*" [dev-dependencies] Loading tools/pdl/src/main.rs +6 −6 Original line number Diff line number Diff line //! PDL parser and linter. use clap::Parser; use codespan_reporting::term::{self, termcolor}; use structopt::StructOpt; mod ast; mod backends; Loading Loading @@ -30,20 +30,20 @@ impl std::str::FromStr for OutputFormat { } } #[derive(Debug, StructOpt)] #[structopt(name = "pdl-parser", about = "Packet Description Language parser tool.")] #[derive(Parser, Debug)] #[clap(name = "pdl-parser", about = "Packet Description Language parser tool.")] struct Opt { /// Print tool version and exit. #[structopt(short, long = "--version")] #[clap(short, long = "--version")] version: bool, /// Generate output in this format ("json" or "rust"). The output /// will be printed on stdout in both cases. #[structopt(short, long = "--output-format", name = "FORMAT", default_value = "JSON")] #[clap(short, long = "--output-format", name = "FORMAT", default_value = "JSON")] output_format: OutputFormat, /// Input file. #[structopt(name = "FILE")] #[clap(name = "FILE")] input_file: String, } Loading Loading
tools/pdl/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ rust_defaults { "libquote", "libserde", "libserde_json", "libstructopt", "libclap", "libsyn", "libtempfile", ], Loading
tools/pdl/Cargo.toml +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ proc-macro2 = "*" quote = "*" serde = { version = "*", features = ["default", "derive", "serde_derive", "std"] } serde_json = "*" structopt = "*" clap = { version = "*", features = ["derive"] } syn = "*" [dev-dependencies] Loading
tools/pdl/src/main.rs +6 −6 Original line number Diff line number Diff line //! PDL parser and linter. use clap::Parser; use codespan_reporting::term::{self, termcolor}; use structopt::StructOpt; mod ast; mod backends; Loading Loading @@ -30,20 +30,20 @@ impl std::str::FromStr for OutputFormat { } } #[derive(Debug, StructOpt)] #[structopt(name = "pdl-parser", about = "Packet Description Language parser tool.")] #[derive(Parser, Debug)] #[clap(name = "pdl-parser", about = "Packet Description Language parser tool.")] struct Opt { /// Print tool version and exit. #[structopt(short, long = "--version")] #[clap(short, long = "--version")] version: bool, /// Generate output in this format ("json" or "rust"). The output /// will be printed on stdout in both cases. #[structopt(short, long = "--output-format", name = "FORMAT", default_value = "JSON")] #[clap(short, long = "--output-format", name = "FORMAT", default_value = "JSON")] output_format: OutputFormat, /// Input file. #[structopt(name = "FILE")] #[clap(name = "FILE")] input_file: String, } Loading