Visitador: implemented returnStmts

This commit is contained in:
Carlos Galindo 2019-03-27 11:55:19 +01:00
parent 709bde80af
commit 64395b31a0
Signed by untrusted user who does not match committer: kauron
GPG key ID: 83E68706DEE119A3

View file

@ -37,6 +37,15 @@ public class Visitador extends VoidVisitorAdapter<CFG> {
graph.connect(n, end);
}
@Override
public void visit(ReturnStmt n, CFG arg) {
arg.addNode(n);
arg.connect(prevNode, n);
super.visit(n, arg);
arg.connect(n, arg.endNode());
prevNode = Collections.emptyList();
}
@Override
public void visit(IfStmt n, CFG graph) {
Node ifStart = n.getCondition();