Skip to content

Commit

Permalink
fix error get_attribute_reference_name never nil
Browse files Browse the repository at this point in the history
  • Loading branch information
biletskyy authored and mhanberg committed Sep 15, 2023
1 parent d171420 commit d9042f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/next_ls/ast_helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ defmodule NextLS.ASTHelpers do

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

"@#{name}"
name
end

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

0 comments on commit d9042f3

Please sign in to comment.