From a00ceb882ac2086e5853c8565b762137af2e0797 Mon Sep 17 00:00:00 2001 From: Muqsit Date: Tue, 9 Jul 2024 06:08:06 +0000 Subject: [PATCH] fix: ParseException::undefinedOperatorAssociativity returns wrong error code --- src/muqsit/arithmexp/ParseException.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/muqsit/arithmexp/ParseException.php b/src/muqsit/arithmexp/ParseException.php index 9124fdf..0d7f330 100644 --- a/src/muqsit/arithmexp/ParseException.php +++ b/src/muqsit/arithmexp/ParseException.php @@ -29,6 +29,7 @@ final class ParseException extends Exception{ public const ERR_UNEXPECTED_TOKEN = 100008; public const ERR_UNRESOLVABLE_EXPRESSION = 100009; public const ERR_UNRESOLVABLE_FCALL = 100010; + public const ERR_UNDEFINED_OPERAND_ASSOCIATIVITY = 100011; public static function generateWithHighlightedSubstring(self $exception) : self{ return new self( @@ -75,7 +76,7 @@ public static function undefinedOperatorAssociativity(string $expression, Positi $position->start, $position->end, $expression - ), self::ERR_NO_OPERAND_BINARY_LEFT)); + ), self::ERR_UNDEFINED_OPERAND_ASSOCIATIVITY)); } public static function noClosingParenthesis(string $expression, Position $position) : self{