Fix implicit start/end parentheses

This commit is contained in:
Kasper 2021-08-16 06:32:40 +02:00
parent d8af50d991
commit a86865e856
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
## Next
- Add support for dividing length units by speed units (like 10 km / 100 kph)
- Add support for data transfer rate units (eg. megabytes per second)
## 1.8.0 - 2021 Aug 16
- Add support for data transfer rate units (like mb/s)
- Add support for dividing length by speed (like 10 km / 100 kph)
## 1.7.0 - 2021 Jul 14
- Add operator words `plus`, `minus` and `times`

View File

@ -126,11 +126,11 @@ fn parse_token(c: &str, lexer: &mut Lexer) -> Result<(), String> {
"^" => tokens.push(Token::Operator(Caret)),
"!" => tokens.push(Token::UnaryOperator(Factorial)),
"(" => {
// left_paren_count += 1;
lexer.left_paren_count += 1;
tokens.push(Token::Operator(LeftParen));
},
")" => {
// right_paren_count += 1;
lexer.right_paren_count += 1;
tokens.push(Token::Operator(RightParen));
},
"π" => tokens.push(Token::Constant(Pi)),