From 03b9df23624260a81ca4e80ab241b6bfd6f9bdd3 Mon Sep 17 00:00:00 2001 From: Kasper Date: Sat, 14 Nov 2020 04:10:56 +0100 Subject: [PATCH] Fixed trailing percentage sign being ignored --- src/lexer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lexer.rs b/src/lexer.rs index 9034f47..e35b858 100644 --- a/src/lexer.rs +++ b/src/lexer.rs @@ -18,7 +18,7 @@ pub fn lex(input: &str, allow_trailing_operators: bool, default_degree: Unit) -> if allow_trailing_operators { match &input.chars().last().unwrap_or('x') { - '+' | '-' | '*' | '/' | '%' | '^' | '(' => { + '+' | '-' | '*' | '/' | '^' | '(' => { input.pop(); }, _ => {},