Fixed unary + at start

pull/2/head
Mark 2023-04-07 09:37:39 -07:00
parent 9b099bb408
commit 82b577568c
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
1 changed files with 3 additions and 1 deletions

View File

@ -22,7 +22,9 @@ fn lookback_signs(
=> { => {
if o == "-" { if o == "-" {
g.insert(i, PreToken::PreOperator(*l, String::from("neg"))); g.insert(i, PreToken::PreOperator(*l, String::from("neg")));
} else if o != "+" { g.insert(i, a); } } else if o == "+" {
continue; // We should not increment i if we remove a token
} else {g.insert(i, a);}
}, },
_ => { g.insert(i, a); } _ => { g.insert(i, a); }
}; };