Skip to content

Commit 4f0621a

Browse files
committed
m4: Improvements to the help message
1 parent d752ec8 commit 4f0621a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

m4/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "m4"
33
version = "0.1.0"
44
edition = "2021"
5+
description = "m4 - macro language processor"
56

67
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
78

m4/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ impl ArgumentDefine {
5151
}
5252
}
5353

54+
/// Define a symbol name to have some value [`DefineDirective::Define`] or NULL
55+
/// [`DefineDirective::Undefine`].
5456
#[derive(Debug, Clone)]
5557
pub enum DefineDirective {
5658
/// `name[=val]`
@@ -66,6 +68,7 @@ pub struct Args {
6668
/// Enable line synchronization output for the c99 preprocessor phase (that is, #line
6769
/// directives).
6870
pub line_synchronization: bool,
71+
/// See [`DefineDirective`].
6972
pub define_directives: Vec<DefineDirective>,
7073
/// Whether to read input from a file.
7174
pub files: Vec<PathBuf>,
@@ -77,12 +80,14 @@ impl Args {
7780
.arg(
7881
clap::Arg::new("line_synchronization")
7982
.short('s')
83+
.help("Output line synchronization directives, suitable for cpp")
8084
.action(clap::ArgAction::SetTrue),
8185
)
8286
.arg(
8387
clap::Arg::new("define")
8488
.short('D')
85-
.value_name("name[=val]")
89+
.value_name("name[=value]")
90+
.help("Define the symbol name to have some value (or NULL)")
8691
.num_args(1)
8792
.action(clap::ArgAction::Append),
8893
)

0 commit comments

Comments
 (0)