@Override public void visit(AssignmentNode node) { if (node.getGAPP() != null) { LinkedList<GAPPBaseInstruction> instructions = node.getGAPP().getInstructions(); LinkedList<GAPPBaseInstruction> delInstructions = new LinkedList<GAPPBaseInstruction>(); for (GAPPBaseInstruction instr : instructions) { Object result = instr.accept(this, null); if (result != null && ((Boolean) result).booleanValue()) { delInstructions.add(instr); } } for (GAPPBaseInstruction instr : delInstructions) { instructions.remove(instr); } } super.visit(node); } }
@Override public void visit(AssignmentNode node) { instructionsLoc.addAll(node.getGAPP().getInstructions()); super.visit(node); } };
@Override public void visit(AssignmentNode node) { result.append("//"); result.append(node.getVariable().toString()); result.append(" = "); result.append(node.getValue().toString()); result.append('\n'); if (node.getGAPP() != null) { node.getGAPP().accept(this, null); } result.append('\n'); node.getSuccessor().accept(this); }