From 450c67484bcf2836807b4c6a9f128df2149d47d6 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Mon, 13 Feb 2023 23:18:35 -0800 Subject: [PATCH] For now, don't implement ts_tree_print_dot_graph on windows --- lib/src/tree.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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