consistent toString functions for expressions, parentasis are added if neccessary

This commit is contained in:
wea_ondara
2022-07-14 18:02:18 +02:00
parent 7dafade67a
commit eb5b3a9879
14 changed files with 297 additions and 194 deletions

View File

@@ -15,6 +15,11 @@ public class TernaryExpression implements Expression {
return Type.TERNARY;
}
@Override
public Priority getPriority() {
return Priority.TERNARY;
}
@Override
public String toString() {
return "IF(" + cond + ", " + whenTrue + ", " + whenFalse + ")";