Skip to content
Snippets Groups Projects
Commit 1e0e9810 authored by Paweł Kędzia's avatar Paweł Kędzia
Browse files

Added method for dumping variables

parent 5295cb3a
Branches
No related merge requests found
......@@ -138,6 +138,19 @@ public:
* @see clone_ptr - a version that keeps values of the variables.
*/
boost::shared_ptr<ParsedExpression> clone_clean_ptr() const;
/**
* Dup all variables to error stream.
*/
void dumpvariables(const Corpus2::Tagset& tagset)
{
typedef std::pair<std::string, boost::shared_ptr<Wccl::Value> > v_t;
foreach (const v_t& v, variables_->get_all<Wccl::Value>()) {
std::cerr << v.second->make_var_repr(v.first) << "="
<< v.second->to_string(tagset) << "\n";
}
}
protected:
explicit ParsedExpression(const Variables& variables);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment