diff --git a/src/sa/Sc2sa.java b/src/sa/Sc2sa.java index 11187e726826b27fed80800378924d3be9d2ecb1..add300f1e782ecf4b05d78eba89d92aa8ccc852c 100644 --- a/src/sa/Sc2sa.java +++ b/src/sa/Sc2sa.java @@ -216,7 +216,7 @@ public class Sc2sa extends DepthFirstAdapter @Override public void caseAInfEquals(AInfEquals node) { - inAInfEquals(node); + inAInfEquals(node) ; if(node.getEquals() != null) { node.getEquals().apply(this); @@ -648,12 +648,10 @@ public class Sc2sa extends DepthFirstAdapter SaInst op2 = null ; SaInst op3 = null ; - node.getSi().apply(this); + node.getExp().apply(this); op1 = (SaExp) this.returnValue ; - node.getAlors().apply(this); - op2 = (SaInst) this.returnValue ; node.getBloc().apply(this); - op3 = (SaInst) this.returnValue ; + op2 = (SaInst) this.returnValue ; this.returnValue = new SaInstSi(op1,op2,op3); } @@ -671,32 +669,18 @@ public class Sc2sa extends DepthFirstAdapter @Override public void caseASisinonIns(ASisinonIns node) { - inASisinonIns(node); - if(node.getSi() != null) - { - node.getSi().apply(this); - } - if(node.getExp() != null) - { - node.getExp().apply(this); - } - if(node.getAlors() != null) - { - node.getAlors().apply(this); - } - if(node.getAlor() != null) - { - node.getAlor().apply(this); - } - if(node.getSinon() != null) - { - node.getSinon().apply(this); - } - if(node.getSino() != null) - { - node.getSino().apply(this); - } - outASisinonIns(node); + SaExp op1 = null ; + SaInst op2 = null ; + SaInst op3 = null ; + + node.getExp().apply(this); + op1 = (SaExp) this.returnValue ; + node.getAlor().apply(this); + op2 = (SaInst) this.returnValue ; + node.getSino().apply(this); + op3 = (SaInst) this.returnValue; + + this.returnValue = new SaInstSi(op1,op2,op3); } public void inAReturnIns(AReturnIns node) @@ -1054,7 +1038,6 @@ public class Sc2sa extends DepthFirstAdapter defaultOut(node); } - @Override public void caseATypeType(ATypeType node) { inATypeType(node); @@ -1075,7 +1058,6 @@ public class Sc2sa extends DepthFirstAdapter defaultOut(node); } - @Override public void caseAType(AType node) { inAType(node);