Organize source into compiler and runtime dirs
This commit is contained in:
parent
e480cf538d
commit
9618efd12a
46 changed files with 169 additions and 38 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue