mirror of
https://github.com/tree-sitter/tree-sitter.git
synced 2026-09-10 07:26:23 -04:00
Improve stream method for Items
This commit is contained in:
parent
a77ca1ee08
commit
5ce55ce26f
|
|
@ -21,18 +21,18 @@ namespace tree_sitter {
|
|||
|
||||
ostream& operator<<(ostream &stream, const LexItem &item) {
|
||||
return stream <<
|
||||
string("#<item '") <<
|
||||
string("#<item ") <<
|
||||
item.lhs <<
|
||||
string("' ") <<
|
||||
string(" ") <<
|
||||
*item.rule <<
|
||||
string(">");
|
||||
}
|
||||
|
||||
ostream& operator<<(ostream &stream, const ParseItem &item) {
|
||||
return stream <<
|
||||
string("#<item '") <<
|
||||
string("#<item ") <<
|
||||
item.lhs <<
|
||||
string("' ") <<
|
||||
string(" ") <<
|
||||
*item.rule <<
|
||||
string(" ") <<
|
||||
to_string(item.consumed_symbols.size()) <<
|
||||
|
|
|
|||
Loading…
Reference in a new issue