Fix stream operator on rules and items
This commit is contained in:
parent
11e3980319
commit
6bbaba3ef8
4 changed files with 49 additions and 13 deletions
|
|
@ -1,7 +1,11 @@
|
|||
#include "rule.h"
|
||||
|
||||
std::ostream& operator<<(std::ostream& stream, const tree_sitter::rules::Rule &rule)
|
||||
{
|
||||
stream << rule.to_string();
|
||||
return stream;
|
||||
namespace tree_sitter {
|
||||
namespace rules {
|
||||
std::ostream& operator<<(std::ostream& stream, const Rule &rule)
|
||||
{
|
||||
stream << rule.to_string();
|
||||
return stream;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ namespace tree_sitter {
|
|||
};
|
||||
|
||||
typedef std::shared_ptr<const Rule> rule_ptr;
|
||||
std::ostream& operator<<(std::ostream& stream, const Rule &rule);
|
||||
}
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& stream, const tree_sitter::rules::Rule &rule);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue