Skip to content

Commit

Permalink
Be prepared for additional operators
Browse files Browse the repository at this point in the history
  • Loading branch information
ready-player1 committed Oct 17, 2023
1 parent fca2d04 commit 64dd258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.c
Expand Up @@ -325,7 +325,7 @@ enum { Infix, Prefix, EndOfStyles };
inline static Precedence getPrecedence(int style, int operator)
{
assert(0 <= style && style < EndOfStyles);
return 0 <= operator && operator <= Assign
return 0 <= operator && operator < Lparen
? precedenceTable[operator][style]
: NoPrecedence;
}
Expand Down

0 comments on commit 64dd258

Please sign in to comment.