When parsing, the code checks if peek()->Type() != TokenType::EOL, to check if it is an operator. (Inside the parsingAdditionExpression and parsingMultiplicationExpression) But if it is any type other than EOL and OPERATOR the code crashes. Hence the code was changed to peek()->Type() == TokenType::OPERATOR
Changes
peek()->Type() != TokenType::EOL
, to check if it is an operator. (Inside theparsingAdditionExpression
andparsingMultiplicationExpression
) But if it is any type other than EOL and OPERATOR the code crashes. Hence the code was changed topeek()->Type() == TokenType::OPERATOR