From f9a3142190c2b36c4bf528db338d3b0c61736747 Mon Sep 17 00:00:00 2001 From: Mikkel Tygesen Date: Tue, 7 Jan 2025 21:23:07 +0100 Subject: [PATCH] overriden addParentheses for subtract expressions --- .../dk/aau/cs/model/CPN/Expressions/SubtractExpression.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/dk/aau/cs/model/CPN/Expressions/SubtractExpression.java b/src/main/java/dk/aau/cs/model/CPN/Expressions/SubtractExpression.java index b775e5793..6ef06a94b 100644 --- a/src/main/java/dk/aau/cs/model/CPN/Expressions/SubtractExpression.java +++ b/src/main/java/dk/aau/cs/model/CPN/Expressions/SubtractExpression.java @@ -114,6 +114,11 @@ public void getVariables(Set variables) { right.getVariables(variables); } + @Override + public boolean addParentheses() { + return parent != null; + } + @Override public String toString() { if (addParentheses()) {