Skip to content
Snippets Groups Projects
Commit 3fadd663 authored by BAUQUIN Niels's avatar BAUQUIN Niels
Browse files

dthfg

parent b4714a00
No related branches found
No related tags found
No related merge requests found
...@@ -31,9 +31,7 @@ public class Sc2sa extends DepthFirstAdapter ...@@ -31,9 +31,7 @@ public class Sc2sa extends DepthFirstAdapter
@Override @Override
public void caseStart(Start node) { public void caseStart(Start node) {
inStart(node); super.caseStart(node);
node.getPProg().apply(this);
outStart(node);
} }
@Override @Override
...@@ -46,6 +44,7 @@ public class Sc2sa extends DepthFirstAdapter ...@@ -46,6 +44,7 @@ public class Sc2sa extends DepthFirstAdapter
node.getLdecfonc().apply(this); node.getLdecfonc().apply(this);
op2 = (SaLDecFonc) this.returnValue; op2 = (SaLDecFonc) this.returnValue;
this.returnValue = new SaProg(op1, op2); this.returnValue = new SaProg(op1, op2);
this.saRoot = (SaProg) this.returnValue;
outAProgProg(node); outAProgProg(node);
} }
...@@ -444,7 +443,7 @@ public class Sc2sa extends DepthFirstAdapter ...@@ -444,7 +443,7 @@ public class Sc2sa extends DepthFirstAdapter
@Override @Override
public void caseAIdVar(AIdVar node) { public void caseAIdVar(AIdVar node) {
String id = ""; String id = null;
inAIdVar(node); inAIdVar(node);
id = node.getId().getText(); id = node.getId().getText();
this.returnValue = new SaVarSimple(id); this.returnValue = new SaVarSimple(id);
...@@ -481,10 +480,7 @@ public class Sc2sa extends DepthFirstAdapter ...@@ -481,10 +480,7 @@ public class Sc2sa extends DepthFirstAdapter
@Override @Override
public void caseATypeTypeopt(ATypeTypeopt node) { public void caseATypeTypeopt(ATypeTypeopt node) {
inATypeTypeopt(node); inATypeTypeopt(node);
Type type = null; this.returnType = Type.NUL;
node.getType().apply(this);
type = this.returnType;
this.returnType = Type.fromString(type.nom());
outATypeTypeopt(node); outATypeTypeopt(node);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment