getLValuePriority

bugfix postFix means operator to end


git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@681 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 6e9a7e83be
commit 494d36eaab
  1. 13
      jode/jode/expr/PrePostFixOperator.java

@ -58,8 +58,11 @@ public class PrePostFixOperator extends Operator {
* Sets the return type of this operator.
*/
public void setType(Type type) {
store.setLValueType(type);
super.setType(store.getLValueType());
if (!isVoid()) {
store.setLValueType(type);
super.setType(store.getLValueType());
} else
super.setType(type);
}
public void setOperandType(Type[] inputTypes) {
@ -71,18 +74,18 @@ public class PrePostFixOperator extends Operator {
throws java.io.IOException {
boolean needBrace = false;
int priority = 700;
if (postfix) {
if (!postfix) {
writer.print(getOperatorString());
priority = 800;
}
if (store.getPriority() < priority) {
if (store.getLValuePriority() < priority) {
needBrace = true;
writer.print("(");
}
store.dumpLValue(writer, operands);
if (needBrace)
writer.print(")");
if (!postfix)
if (postfix)
writer.print(getOperatorString());
}
}

Loading…
Cancel
Save