Skip to content

Commit

Permalink
Revert "stash"
Browse files Browse the repository at this point in the history
This reverts commit e87ef6294968fbe6d7a7ad67285ebacb945fa6d2.
  • Loading branch information
garazdawi committed Oct 8, 2021
1 parent aa3192c commit 12ec252
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions apps/els_lsp/src/els_parser.erl
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ attribute(Tree) ->
TypeArgs = erl_syntax:list_elements(ArgsListTree),
case is_atom_node(Type) of
{true, TypeName} ->
[poi(Pos, type_definition,
[poi(erl_syntax:get_pos(Type), type_definition,
{TypeName, length(TypeArgs)}, #{ args => type_args(TypeArgs)})];
_ ->
[]
Expand Down Expand Up @@ -641,11 +641,9 @@ type_application(Tree) ->
Id = {Name, Arity},
Pos = erl_syntax:get_pos(erl_syntax:user_type_application_name(Tree)),
[poi(Pos, type_application, Id)];
{Name, Arity} when Type =:= type_application ->
%% Built-in types
Id = {erlang, Name, Arity},
Pos = erl_syntax:get_pos(erl_syntax:type_application_name(Tree)),
[poi(Pos, type_application, Id)]
{_Name, _Arity} when Type =:= type_application ->
%% No POIs for built-in types
[]
end.

-spec variable(tree()) -> [poi()].
Expand Down

0 comments on commit 12ec252

Please sign in to comment.