Skip to content

Commit c8095c0

Browse files
committed
fix(lex): Allow an exponent 'E'
1 parent 9ebdf8c commit c8095c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clap_lex/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,9 @@ fn is_number(arg: &str) -> bool {
505505
// optional exponent, and only if it's not the first character.
506506
b'.' if !seen_dot && position_of_e.is_none() && i > 0 => seen_dot = true,
507507

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

512512
_ => return false,
513513
}

0 commit comments

Comments
 (0)