Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/smvlang/smv_parse_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ std::string to_string(smv_parse_treet::modulet::elementt::element_typet i)
return "";
}

void smv_parse_treet::modulet::elementt::show(std::ostream &out) const
{
out << " TYPE: " << to_string(element_type) << '\n';
out << " EXPR: " << expr.pretty() << '\n';
}

void smv_parse_treet::show(std::ostream &out) const
{
for(auto &module_it : modules)
Expand Down Expand Up @@ -144,9 +150,8 @@ void smv_parse_treet::show(std::ostream &out) const

for(auto &element : module.elements)
{
out << " TYPE: " << to_string(element.element_type) << '\n';
out << " EXPR: " << element.expr.pretty() << '\n';
out << std::endl;
element.show(out);
out << '\n';
}
}
}
2 changes: 2 additions & 0 deletions src/smvlang/smv_parse_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ class smv_parse_treet
is_define());
return to_equal_expr(expr);
}

void show(std::ostream &) const;
};

typedef std::list<elementt> element_listt;
Expand Down
Loading