fix(julia): fix incorrect documentation query

This patch fixes an inprecise `@string.documentation` query introduced
in https://github.com/nvim-treesitter/nvim-treesitter/pull/7391. The
pattern `(string_literal) . (call_expression)` matches also for example
`"hello"` in `foo("hello", bar())`. Similarly to
https://github.com/nvim-treesitter/nvim-treesitter/pull/7436, this patch
limits the pattern to top-level statements.
This commit is contained in:
Fredrik Ekre 2024-12-05 14:47:34 +01:00 committed by Christian Clason
parent 046b8e9361
commit acada1a685

View file

@ -356,13 +356,15 @@
(macro_definition) (macro_definition)
(module_definition) (module_definition)
(struct_definition) (struct_definition)
(call_expression)
]) ])
(source_file (source_file
(string_literal) @string.documentation (string_literal) @string.documentation
. .
(identifier)) [
(identifier)
(call_expression)
])
[ [
(line_comment) (line_comment)