Skip to content

Commit

Permalink
fix #134
Browse files Browse the repository at this point in the history
  • Loading branch information
taiseiue committed Apr 9, 2024
1 parent 13dd467 commit 463309d
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions Losetta/Parsing/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -928,25 +928,28 @@ private static int GetPriority(string action)
{
switch (action)
{
case "**":
case "++":
case "--": return 11;
case "--": return 14;
case "**": return 13;
case "%":
case "*":
case "/": return 10;
case "/": return 12;
case "+":
case "-": return 9;
case "-": return 11;
case Constants.LEFT_SHIFT:
case Constants.RIGHT_SHIFT: return 10;
case "<":
case ">":
case ">=":
case "<=": return 8;
case "<=": return 9;
case "==":
case "!=": return 7;
case "&": return 6;
case "!=": return 8;
case "&": return 7;
case "^": return 6;
case "|": return 5;
case "^": return 4;
case "&&": return 2;
case "||": return 2;
case "&&": return 4;
case "||": return 3;
case "??": return 2;
case "=": return 1;
default: return 0;// NULL action has priority 0.
}
Expand Down

0 comments on commit 463309d

Please sign in to comment.