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

View file

@ -139,7 +139,7 @@ public class Visitador extends VoidVisitorAdapter<CFG> {
@Override @Override
public void visit(ForeachStmt n, CFG graph) { 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.addNode(copy);
graph.connect(prevNode, copy); graph.connect(prevNode, copy);
prevNode = Collections.singletonList(copy); prevNode = Collections.singletonList(copy);
@ -148,13 +148,11 @@ public class Visitador extends VoidVisitorAdapter<CFG> {
prevNode = Collections.singletonList(copy); prevNode = Collections.singletonList(copy);
} }
// Visitador de expresiones
// Cada expresión encontrada genera un nodo en el CFG
@Override @Override
public void visit(ExpressionStmt es, CFG graph) { public void visit(ExpressionStmt es, CFG graph) {
graph.addNode(es); graph.addNode(es);
graph.connect(prevNode, es); graph.connect(prevNode, es);
prevNode = Collections.singletonList((Node) es); prevNode = Collections.singletonList(es);
// Seguimos visitando... // Seguimos visitando...
super.visit(es, graph); super.visit(es, graph);