Collapse rules that contain only a single token

This commit is contained in:
Max Brunsfeld 2014-01-05 01:19:32 -08:00
parent 04d18b56ed
commit 0985fa3008
7 changed files with 70 additions and 61 deletions

View file

@ -6,6 +6,10 @@ using std::string;
namespace tree_sitter {
namespace rules {
bool Rule::operator!=(const Rule &other) const {
return !this->operator==(other);
}
ostream& operator<<(ostream& stream, const Rule &rule) {
return stream << rule.to_string();
}