Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix highlighting of function definitions with guard clauses #638

Merged
merged 5 commits into from Mar 10, 2017
Merged

Conversation

KronicDeth
Copy link
Owner

Fixes #571

Changelog

Enhancements

  • The Callable annotator is meant for variables, parameters, and macro and function calls and declarations. The ModuleAttribute annotator handles ModuleAttribute declaration and usage, so we can save reference resolution time by skipping module attributes in Callable.

Bug Fixes

  • The run configurations I put together in Migrate build system to Gradle #504 didn't allow for the debugger to work properly: neither pause nor breakpoints had any effect, so regenerate them from the Gradle pane.
  • Check parent of when operation in case it's a guarded function head in org.elixir_lang.annonator.Parameter.putParameterized(Parameter, PsiElement)
  • Instead of highlighting call definition clauses when they are referred to, which only works if it is in the same file, highlight all function and macro declarations when the def* call is encountered.
  • Only increment arity for right pipe operand instead of all operands, so that left operands resolve to correct arity or as variable/parameter.

The run configurations I put together in #504 didn't allow for the
debugger to work properly: neither pause nor breakpoints had any effect.
The callable annotator is meant for variables, parameters, and macro and
function calls and declarations.  The ModuleAttribute annotator handles
ModuleAttribute declaration and usage, so we can save reference
resolution time by skipping module attributes in Callable.
Instead of highlighting call definition clauses when they are referred
to, which only works if it is in the same file, highlight all function
and macro declarations when the def* call is encountered.
@KronicDeth KronicDeth changed the title 571 Fix highlighting of function definitions with guard clauses Mar 10, 2017
@KronicDeth KronicDeth merged commit 823d06b into master Mar 10, 2017
@KronicDeth KronicDeth deleted the 571 branch March 10, 2017 16:16
KronicDeth added a commit that referenced this pull request Mar 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect highlighting for functions with guards
1 participant