Return non-const string from ts_node_string
The caller should free the string.
This commit is contained in:
parent
87316f22f3
commit
9d0835edbf
2 changed files with 2 additions and 2 deletions
|
|
@ -206,7 +206,7 @@ const char *ts_node_name(TSNode self, const TSDocument *document) {
|
|||
return document->parser.language->symbol_names[ts_node__tree(self)->symbol];
|
||||
}
|
||||
|
||||
const char *ts_node_string(TSNode self, const TSDocument *document) {
|
||||
char *ts_node_string(TSNode self, const TSDocument *document) {
|
||||
return ts_tree_string(ts_node__tree(self),
|
||||
document->parser.language->symbol_names, false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue