Multiple Aliases parsing and Go To Declarations #364
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #217
Changelog
Enhancements
Regenerate parser with GrammarKit 1.4.2
ElixirSdkRelease
is nowComparable
, so version checks can be done for tests to restrict them to Elixir 1.2+ for multiple alias support.Resolve Multiple Aliases with unqualified Alias in tuples.
canonicalName
borrows from the idea ofPsiReference#canonicalText
: an element can have both a Name (fromgetName
), which is the literal name in the code, which can be renamed, and a Canonical Name, which is the name to refer to the element without need for imports or aliases. For this change,defimpl
,defmodule
, anddefprotocol
will show their full module Alias for their Canonical Name.This change addresses the use case of Go To Declaration that should
resolved to a nested
defmodule
.Bug Fixes
A.{B, C}
to grammar with quoting to check consistence with Elixir 1.2. Ports elixir-lang/elixir#3666.fullyQualifiedName
instead ofgetName
forresolvableName
becausefullyQualifiedName
is needed so that qualified aliases inside of the{ }
of a multiple alias will not have a name asgetName
isnull
for those qualified aliases because the name fromgetName
has to be a literal name that can be renamed and qualified names can't be renamed.