feat(elixir): support parameterless functions (#277)

This commit is contained in:
emmanueltouzery 2023-07-11 17:09:41 +02:00 committed by GitHub
parent e22facd3a6
commit 603ffde23a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View file

@ -20,6 +20,7 @@
(arguments [
(call target: (identifier) @name)
(binary_operator left: (call target: (identifier) @name))
((identifier) @name)
])
(#set! "kind" "Function")
) @type

View file

@ -225,6 +225,15 @@ describe("treesitter elixir", function()
},
},
},
{
kind = "Function",
name = "parameterless_function",
level = 0,
lnum = 68,
col = 0,
end_lnum = 69,
end_col = 3,
},
})
end)
end)

View file

@ -13,7 +13,7 @@ defmodule Example.Module do
defguard public_guard(x) when is_atom(x)
defguard private_guard(x) when is_atom(x)
defmacro public_macro() do
end
@ -64,3 +64,6 @@ defmodule StringTest do
end
end
end
def parameterless_function do
end