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

This commit is contained in:
Steven Arcangeli 2023-06-16 10:54:55 -07:00
parent 87f9133990
commit 4e7da79523
3 changed files with 20 additions and 2 deletions

View file

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

View file

@ -9,7 +9,7 @@ describe("treesitter julia", function()
level = 0,
lnum = 1,
col = 0,
end_lnum = 24,
end_lnum = 26,
end_col = 3,
children = {
{
@ -92,7 +92,7 @@ describe("treesitter julia", function()
level = 1,
lnum = 20,
col = 2,
end_lnum = 22,
end_lnum = 24,
end_col = 5,
children = {
{
@ -104,6 +104,15 @@ describe("treesitter julia", function()
end_lnum = 21,
end_col = 26,
},
{
kind = "Function",
name = "myfuncb",
level = 2,
lnum = 22,
col = 4,
end_lnum = 23,
end_col = 7,
},
},
},
},

View file

@ -19,6 +19,8 @@ end
module submod
mod.myfunc() = nothing
function mod.myfuncb()
end
end
end