For now, don't implement ts_tree_print_dot_graph on windows
This commit is contained in:
parent
0b817a609f
commit
450c67484b
1 changed files with 13 additions and 1 deletions
|
|
@ -1,4 +1,3 @@
|
|||
#include <unistd.h>
|
||||
#include "tree_sitter/api.h"
|
||||
#include "./array.h"
|
||||
#include "./get_changed_ranges.h"
|
||||
|
|
@ -124,8 +123,21 @@ TSRange *ts_tree_get_changed_ranges(const TSTree *self, const TSTree *other, uin
|
|||
return result;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
void ts_tree_print_dot_graph(const TSTree *self, int fd) {
|
||||
(void)self;
|
||||
(void)fd;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
void ts_tree_print_dot_graph(const TSTree *self, int fd) {
|
||||
FILE *file = fdopen(dup(fd), "a");
|
||||
ts_subtree_print_dot_graph(self->root, self->language, file);
|
||||
fclose(file);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue