Organize source into compiler and runtime dirs

This commit is contained in:
Max Brunsfeld 2013-12-15 23:57:30 -08:00
parent e480cf538d
commit 9618efd12a
46 changed files with 169 additions and 38 deletions

View file

@ -1,25 +0,0 @@
#include "rule.h"
#include <set>
namespace tree_sitter {
namespace rules {
size_t Rule::hash_code() const {
return std::hash<std::string>()(to_string());
}
std::ostream& operator<<(std::ostream& stream, const Rule &rule)
{
stream << rule.to_string();
return stream;
}
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;
}
}
}