Put rule transitions in LR namespace

This commit is contained in:
Max Brunsfeld 2013-12-28 23:26:20 -08:00
parent 656f6b0819
commit 30315a78d2
10 changed files with 177 additions and 144 deletions

View file

@ -11,10 +11,10 @@ namespace tree_sitter {
}
ostream& operator<<(ostream& stream, const rule_ptr &rule) {
if (rule.get() == nullptr)
stream << string("<NULL rule>");
if (rule.get())
stream << *rule;
else
stream << rule->to_string();
stream << string("#<null rule>");
return stream;
}
}