Visitador: implemented returnStmts
This commit is contained in:
parent
709bde80af
commit
64395b31a0
1 changed files with 9 additions and 0 deletions
|
@ -37,6 +37,15 @@ public class Visitador extends VoidVisitorAdapter<CFG> {
|
||||||
graph.connect(n, end);
|
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
|
@Override
|
||||||
public void visit(IfStmt n, CFG graph) {
|
public void visit(IfStmt n, CFG graph) {
|
||||||
Node ifStart = n.getCondition();
|
Node ifStart = n.getCondition();
|
||||||
|
|
Loading…
Reference in a new issue