formatting

This commit is contained in:
Michael Freno
2025-12-07 08:46:39 -05:00
parent 5ef00fe65e
commit 4f60e00b2e

View File

@@ -83,9 +83,14 @@ local function tokenize(expr)
-- Check if this is a negative number or subtraction -- Check if this is a negative number or subtraction
-- It's a negative number if previous token is an operator or opening paren -- It's a negative number if previous token is an operator or opening paren
local prevToken = tokens[#tokens] local prevToken = tokens[#tokens]
if not prevToken or prevToken.type == TokenType.PLUS or prevToken.type == TokenType.MINUS if
or prevToken.type == TokenType.MULTIPLY or prevToken.type == TokenType.DIVIDE not prevToken
or prevToken.type == TokenType.LPAREN then or prevToken.type == TokenType.PLUS
or prevToken.type == TokenType.MINUS
or prevToken.type == TokenType.MULTIPLY
or prevToken.type == TokenType.DIVIDE
or prevToken.type == TokenType.LPAREN
then
-- This is a negative number, continue to number parsing -- This is a negative number, continue to number parsing
local numStr = "-" local numStr = "-"
i = i + 1 i = i + 1