Navigation to iterator(), next(), hasNext() through 'in' in for-loops

This commit is contained in:
Andrey Breslav
2013-08-28 14:39:45 +04:00
parent 6fcccff31b
commit a53986e1d6
11 changed files with 260 additions and 1 deletions
@@ -20,6 +20,7 @@ import com.intellij.lang.ASTNode;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.JetNodeTypes;
import org.jetbrains.jet.lexer.JetTokens;
public class JetForExpression extends JetLoopExpression {
public JetForExpression(@NotNull ASTNode node) {
@@ -50,4 +51,9 @@ public class JetForExpression extends JetLoopExpression {
public JetExpression getLoopRange() {
return findExpressionUnder(JetNodeTypes.LOOP_RANGE);
}
@Nullable @IfNotParsed
public ASTNode getInKeywordNode() {
return getNode().findChildByType(JetTokens.IN_KEYWORD);
}
}