Created
August 21, 2020 12:10
-
-
Save anstarovoyt/a113927839c4c9d8a4e5c8fd87554f60 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment