Include rows and columns in TSLength

This way, we don't have to have separate 1D and 2D versions for so many values
This commit is contained in:
Max Brunsfeld 2015-12-04 20:20:29 -08:00
parent 22c76fc71b
commit d2bf88d5fe
14 changed files with 186 additions and 241 deletions

View file

@ -1,4 +1,5 @@
#include "runtime/helpers/tree_helpers.h"
#include <ostream>
using std::string;
using std::to_string;
@ -32,6 +33,6 @@ bool operator==(const TSNode &left, const TSNode &right) {
}
ostream &operator<<(ostream &stream, const TSLength &length) {
return stream << string("{") << to_string(length.chars) << string(", ") <<
to_string(length.bytes) << string("}");
return stream << "{chars:" << length.chars << ", bytes:" <<
length.bytes << ", rows:" << length.rows << ", columns:" << length.columns << "}";
}