fix(ts)(julia): support for namespaced short function definitions (260)

This commit is contained in:
Steven Arcangeli 2023-06-02 08:47:54 -07:00
parent 5c5b355f29
commit 79ebaf01eb
3 changed files with 32 additions and 1 deletions

View file

@ -13,6 +13,13 @@
(#set! "kind" "Function")
) @type
(short_function_definition
name: (field_expression
value: (_)
(identifier) @name)
(#set! "kind" "Function")
) @type
(abstract_definition
name: (identifier) @name
(#set! "kind" "Interface")

View file

@ -9,7 +9,7 @@ describe("treesitter julia", function()
level = 0,
lnum = 1,
col = 0,
end_lnum = 20,
end_lnum = 24,
end_col = 3,
children = {
{
@ -86,6 +86,26 @@ describe("treesitter julia", function()
end_lnum = 18,
end_col = 3,
},
{
kind = "Module",
name = "submod",
level = 1,
lnum = 20,
col = 2,
end_lnum = 22,
end_col = 5,
children = {
{
kind = "Function",
name = "myfunc",
level = 2,
lnum = 21,
col = 4,
end_lnum = 21,
end_col = 26,
},
},
},
},
},
})

View file

@ -17,4 +17,8 @@ end
macro mac(expr)
end
module submod
mod.myfunc() = nothing
end
end