ionide / tree-sitter-fsharp

F# grammar for treesitter
MIT License
81 stars 19 forks source link

common/scanner.h #includes don't work #108

Closed mattgallagher92 closed 4 weeks ago

mattgallagher92 commented 4 weeks ago

.c files in fsharp/src/ and fsharp_signature/src/ refer to common/scanner.h, which in turn #includes .h files in tree_sitter/. It seems that there is a tree_sitter directory in each of fsharp/src/ and fsharp_signature/src/, but I don't think that scanner.h is looking there when it tries to include them during tree-sitter-fsharp install.

Unfortunately, I can't share the error because I've just got my fsharp treesitter integration working again and don't want to risk breaking things while trying to reproduce this error.

Sorry if I've misunderstood the error, I don't know C 😅

Nsidorenco commented 4 weeks ago

Hi!

Including a header file effectively inlines all the code of the header file within the file itself, so the code in common/scanner.h is executed in the context of fsharp/src, so you're issue was probably related to something else. If you can find the error we can debug it further :)

mattgallagher92 commented 4 weeks ago

Thanks for the info 🙂 and sorry for the incorrect error report!

When I can afford to risk breaking things again (I've rolled back to an earlier version of nvim-treesitter without F# support), I'll see if I can reproduce the issues that I was having and share the actual error messages.