diff --git a/lib/src/tree.c b/lib/src/tree.c index bee2a3de..79e1d1ae 100644 --- a/lib/src/tree.c +++ b/lib/src/tree.c @@ -1,4 +1,3 @@ -#include #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 + 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