Ejemplo n.º 1
0
  @Override
  public Object visit(StatementsBlock statementsBlock) throws SemanticError {

    for (Statement stmt : statementsBlock.getStatements()) {
      stmt.accept(this);
    }

    return null;
  }
Ejemplo n.º 2
0
  public Object visit(StatementsBlock statementsBlock) {
    Object temp;
    for (Statement statement : statementsBlock.getStatements()) {
      temp = statement.accept(this);
      if (temp != null) {
        return temp;
      }
    }

    return null;
  }