2013-11-10 14:24:25 -08:00
|
|
|
#include "rule.h"
|
|
|
|
|
|
2013-11-12 08:17:19 -08:00
|
|
|
namespace tree_sitter {
|
|
|
|
|
namespace rules {
|
2013-11-14 21:25:58 -08:00
|
|
|
bool Rule::operator==(const rule_ptr other) const {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2013-11-12 08:17:19 -08:00
|
|
|
std::ostream& operator<<(std::ostream& stream, const Rule &rule)
|
|
|
|
|
{
|
|
|
|
|
stream << rule.to_string();
|
|
|
|
|
return stream;
|
|
|
|
|
}
|
2013-11-14 21:25:58 -08:00
|
|
|
|
|
|
|
|
std::ostream& operator<<(std::ostream& stream, const rule_ptr &rule)
|
|
|
|
|
{
|
|
|
|
|
if (rule.get() == nullptr)
|
|
|
|
|
stream << std::string("<NULL rule>");
|
|
|
|
|
else
|
|
|
|
|
stream << rule->to_string();
|
|
|
|
|
return stream;
|
|
|
|
|
}
|
2013-11-12 08:17:19 -08:00
|
|
|
}
|
2013-11-10 14:24:25 -08:00
|
|
|
}
|