Forked from anstarovoyt/seach recursive functions
Last active
August 22, 2020 15:56
-
-
Save alexbaumgertner/e39dab37c86c7624f7722cb9cc39a1d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def el = __context__; | |
if (el instanceof com.intellij.lang.javascript.psi.JSReferenceExpression) { | |
while (true) { | |
el = el.getParent() | |
if (el == null) return false | |
if (el instanceof com.intellij.lang.javascript.psi.JSFunction) { | |
return __context__.getReferenceName().equals(el.getName()) | |
} | |
} | |
} | |
return false; |
Author
alexbaumgertner
commented
Aug 22, 2020
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment