Remove warnings

This commit is contained in:
Carlos Galindo 2019-04-02 19:54:47 +02:00
parent a5ba8831b2
commit b0fe4738e3
Signed by untrusted user who does not match committer: kauron
GPG Key ID: 83E68706DEE119A3
1 changed files with 2 additions and 4 deletions

View File

@ -139,7 +139,7 @@ public class Visitador extends VoidVisitorAdapter<CFG> {
@Override
public void visit(ForeachStmt n, CFG graph) {
ForeachStmt copy = new ForeachStmt(n.getTokenRange().get(), n.getVariable(), n.getIterable(), new EmptyStmt());
ForeachStmt copy = new ForeachStmt(n.getTokenRange().isPresent() ? n.getTokenRange().get() : null, n.getVariable(), n.getIterable(), new EmptyStmt());
graph.addNode(copy);
graph.connect(prevNode, copy);
prevNode = Collections.singletonList(copy);
@ -148,13 +148,11 @@ public class Visitador extends VoidVisitorAdapter<CFG> {
prevNode = Collections.singletonList(copy);
}
// Visitador de expresiones
// Cada expresión encontrada genera un nodo en el CFG
@Override
public void visit(ExpressionStmt es, CFG graph) {
graph.addNode(es);
graph.connect(prevNode, es);
prevNode = Collections.singletonList((Node) es);
prevNode = Collections.singletonList(es);
// Seguimos visitando...
super.visit(es, graph);