Fixed trailing percentage sign being ignored
This commit is contained in:
parent
961daae9d5
commit
03b9df2362
@ -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();
|
||||||
},
|
},
|
||||||
_ => {},
|
_ => {},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user