tree-sitter/src/compiler/rules/rule.cpp

22 lines
507 B
C++
Raw Normal View History

#include "rule.h"
2013-12-15 14:41:51 -08:00
#include <set>
using std::ostream;
using std::string;
2013-11-12 08:17:19 -08:00
namespace tree_sitter {
namespace rules {
ostream& operator<<(ostream& stream, const Rule &rule) {
return stream << rule.to_string();
2013-11-12 08:17:19 -08:00
}
ostream& operator<<(ostream& stream, const rule_ptr &rule) {
if (rule.get() == nullptr)
stream << string("<NULL rule>");
else
stream << rule->to_string();
return stream;
}
2013-11-12 08:17:19 -08:00
}
}