printing fixes

This commit is contained in:
ProgramSnail 2023-07-25 21:33:57 +03:00
parent 0bb72e0b10
commit 469cb3581f
23 changed files with 318 additions and 151 deletions

View file

@ -63,6 +63,16 @@ public:
return source_->substr(start, end - start);
}
size_t get_value_length() const { // from source
if (is_null()) {
error_handling::handle_general_error(
"Null parsing node method called (get_value_length)");
}
size_t start = ts_node_start_byte(node_);
size_t end = ts_node_end_byte(node_);
return end - start;
}
bool is_null() const { return ts_node_is_null(node_); }
bool is_named() const {