diff --git a/src/utils/number.rs b/src/utils/number.rs index 0f5615c..55bf8aa 100644 --- a/src/utils/number.rs +++ b/src/utils/number.rs @@ -100,6 +100,8 @@ pub(crate) fn eat_number>( if times_ten.is_empty() && !times_ten_is_postive { return Err(("Expected digit.", toks.peek().unwrap_or(&t).pos).into()); + } else if times_ten.len() > 2 { + return Err(("Exponent too large.", toks.peek().unwrap_or(&t).pos).into()); } } break;