mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-09 16:38:46 +00:00
printing fixes
This commit is contained in:
parent
0bb72e0b10
commit
469cb3581f
23 changed files with 318 additions and 151 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue