Skip to content

Commit

Permalink
fix(lex): Allow an exponent 'E'
Browse files Browse the repository at this point in the history
  • Loading branch information
cakebaker committed Dec 5, 2024
1 parent 9ebdf8c commit c8095c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clap_lex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,9 @@ fn is_number(arg: &str) -> bool {
// optional exponent, and only if it's not the first character.
b'.' if !seen_dot && position_of_e.is_none() && i > 0 => seen_dot = true,

// Allow an exponent `e` but only at most one after the first
// Allow an exponent `e`/`E` but only at most one after the first
// character.
b'e' if position_of_e.is_none() && i > 0 => position_of_e = Some(i),
b'e' | b'E' if position_of_e.is_none() && i > 0 => position_of_e = Some(i),

_ => return false,
}
Expand Down

0 comments on commit c8095c0

Please sign in to comment.