Reworked prompt

This commit is contained in:
2023-03-23 22:10:53 -07:00
parent a23cea274f
commit 0eec282cc2
4 changed files with 131 additions and 135 deletions

View File

@ -211,15 +211,18 @@ pub fn tokenize(input: &String) -> Result<Token, (LineLocation, ParserError)> {
// Operator
// Always one character
'+' | '*' | '/' | '^' | '%' => {
'*'|'×'|
'/'|'÷'|
'+'|'%'|'^' => {
push_token(g_now, i, t)?;
t = Some(Token::PreOperator(
LineLocation{pos: i, len: 1},
match c {
'^' => Operators::Power,
'%' => Operators::Modulo,
'*' => Operators::Multiply,
'/' => Operators::Divide,
'*'|'×' => Operators::Multiply,
'/'|'÷' => Operators::Divide,
'+' => Operators::Add,
_ => panic!()
}