Skip to content

Commit c2db6c9

Browse files
committed
fix error get_attribute_reference_name never nil
1 parent 5c1e17b commit c2db6c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/next_ls/ast_helpers.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ defmodule NextLS.ASTHelpers do
77

88
{_ast, name} =
99
Macro.prewalk(ast, nil, fn
10-
{:@, [line: ^line, column: ^column], [{name, _meta, nil}]} = ast, _acc -> {ast, name}
10+
{:@, [line: ^line, column: ^column], [{name, _meta, nil}]} = ast, _acc -> {ast, "@#{name}"}
1111
other, acc -> {other, acc}
1212
end)
1313

14-
"@#{name}"
14+
name
1515
end
1616

1717
@spec get_module_attributes(String.t(), module()) :: [{atom(), String.t(), integer(), integer()}]

0 commit comments

Comments
 (0)