diff --git a/kalk/src/interpreter.rs b/kalk/src/interpreter.rs index 736a559..e7ab16e 100644 --- a/kalk/src/interpreter.rs +++ b/kalk/src/interpreter.rs @@ -350,9 +350,6 @@ pub(crate) fn eval_fn_call_expr( return Ok(sum); } "integrate" => { - // Make sure either 3 or 4 arguments were supplied. - if expressions.len() < 3 || expressions.len() > 4 {} - return match expressions.len() { 3 => calculus::integrate_with_unknown_variable( context, diff --git a/kalk/src/lexer.rs b/kalk/src/lexer.rs index 3acca6c..f31f7d5 100644 --- a/kalk/src/lexer.rs +++ b/kalk/src/lexer.rs @@ -200,12 +200,14 @@ impl<'a> Lexer<'a> { }; // Don't include eg. 0x in the value - start += 2; - end += 1; - self.advance(); - value.clear(); - leading_zero = false; - continue; + if base != 10 { + start += 2; + end += 1; + self.advance(); + value.clear(); + leading_zero = false; + continue; + } } if !c.is_digit(base) && c != '.' && c != '_' && !c.is_whitespace()