Fixed trailing percentage sign being ignored

This commit is contained in:
Kasper 2020-11-14 04:10:56 +01:00
parent 961daae9d5
commit 03b9df2362

View File

@ -18,7 +18,7 @@ pub fn lex(input: &str, allow_trailing_operators: bool, default_degree: Unit) ->
if allow_trailing_operators { if allow_trailing_operators {
match &input.chars().last().unwrap_or('x') { match &input.chars().last().unwrap_or('x') {
'+' | '-' | '*' | '/' | '%' | '^' | '(' => { '+' | '-' | '*' | '/' | '^' | '(' => {
input.pop(); input.pop();
}, },
_ => {}, _ => {},