precedence field is protected now

This commit is contained in:
Honfika
2013-12-27 15:07:07 +01:00
parent 6b1ebb910c
commit ff6f875c07
18 changed files with 28 additions and 24 deletions
@@ -51,7 +51,7 @@ public abstract class GraphTargetItem implements Serializable {
public static final int NOPRECEDENCE = 16;
public GraphSourceItem src;
public int pos = -1;
public int precedence;
protected int precedence;
public List<GraphSourceItemPos> moreSrc = new ArrayList<>();
public GraphPart firstPart;
public GraphTargetItem value;
@@ -30,7 +30,7 @@ import java.util.Set;
public class DuplicateItem extends GraphTargetItem {
public DuplicateItem(GraphSourceItem src, GraphTargetItem value) {
super(src, value.precedence);
super(src, value.getPrecedence());
this.value = value;
}
@@ -38,7 +38,7 @@ public abstract class UnaryOpItem extends GraphTargetItem implements UnaryOp {
protected GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
writer.append(operator);
if (value != null) {
if (value.precedence > precedence) {
if (value.getPrecedence() > precedence) {
writer.append("(");
value.toString(writer, localData);
writer.append(")");