2013-08-08 02:10:12 +00:00
|
|
|
/*
|
|
|
|
Copyright (c) 2013 Microsoft Corporation. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
|
|
|
|
Author: Leonardo de Moura
|
|
|
|
*/
|
|
|
|
#pragma once
|
2013-10-25 21:52:08 +00:00
|
|
|
#include <memory>
|
2013-11-19 02:08:28 +00:00
|
|
|
#include <utility>
|
2014-02-16 19:23:25 +00:00
|
|
|
#include <functional>
|
2013-11-19 02:08:28 +00:00
|
|
|
#include "util/buffer.h"
|
2013-09-13 10:35:29 +00:00
|
|
|
#include "kernel/expr.h"
|
|
|
|
#include "kernel/expr_sets.h"
|
2013-08-08 02:10:12 +00:00
|
|
|
|
|
|
|
namespace lean {
|
2014-07-24 01:14:44 +00:00
|
|
|
/** \brief Expression visitor.
|
2013-10-25 22:25:17 +00:00
|
|
|
|
2014-07-24 01:14:44 +00:00
|
|
|
The argument \c f must be a lambda (function object) containing the method
|
2013-08-08 02:10:12 +00:00
|
|
|
|
2014-02-16 19:23:25 +00:00
|
|
|
<code>
|
2014-06-11 22:06:11 +00:00
|
|
|
bool operator()(expr const & e, unsigned offset)
|
2014-02-16 19:23:25 +00:00
|
|
|
</code>
|
2013-08-08 02:10:12 +00:00
|
|
|
|
2014-02-16 19:23:25 +00:00
|
|
|
The \c offset is the number of binders under which \c e occurs.
|
|
|
|
*/
|
2014-07-24 01:14:44 +00:00
|
|
|
void for_each(expr const & e, std::function<bool(expr const &, unsigned)> && f); // NOLINT
|
2013-08-08 02:10:12 +00:00
|
|
|
}
|