Remove warnings
This commit is contained in:
parent
a5ba8831b2
commit
b0fe4738e3
1 changed files with 2 additions and 4 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue