Skip to content

Commit

Permalink
fix: ParseException::undefinedOperatorAssociativity returns wrong err…
Browse files Browse the repository at this point in the history
…or code
  • Loading branch information
Muqsit committed Jul 9, 2024
1 parent 1a31377 commit a00ceb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/muqsit/arithmexp/ParseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit a00ceb8

Please sign in to comment.