Examples of GoForWithClausesStatement


Examples of ro.redeul.google.go.lang.psi.statements.GoForWithClausesStatement

                                    "package main;\n" +
                                    "func test() {\n" +
                                    "   for ;; {}\n" +
                                    "}"));

        GoForWithClausesStatement forStmt =
            castAs(GoForWithClausesStatement.class, 0,
                   get(
                       childAt(0,
                               file.getFunctions()
                       ).getBlock()
                   ).getStatements()
            );

        assertNull(forStmt.getCondition());
    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.statements.GoForWithClausesStatement

                                    "package main;\n" +
                                    "func test() {\n" +
                                    "   for ;e; {}\n" +
                                    "}"));

        GoForWithClausesStatement forStmt =
            castAs(GoForWithClausesStatement.class, 0,
                   get(
                       childAt(0,
                               file.getFunctions()
                       ).getBlock()
                   ).getStatements()
            );

        getAs(GoLiteralExpression.class, forStmt.getCondition());
    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.statements.GoForWithClausesStatement

                                    "package main;\n" +
                                    "func test() {\n" +
                                    "   for ;e+f; {}\n" +
                                    "}"));

        GoForWithClausesStatement forStmt =
            castAs(GoForWithClausesStatement.class, 0,
                   get(
                       childAt(0,
                               file.getFunctions()
                       ).getBlock()
                   ).getStatements()
            );

        getAs(GoAdditiveExpression.class, forStmt.getCondition());
    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.statements.GoForWithClausesStatement

        }
        return false;
    }

    private static boolean isInForClauseStatement(PsiElement element) {
        GoForWithClausesStatement forStatement = findParentOfType(element, GoForWithClausesStatement.class);
        if (forStatement == null) {
            return false;
        }

        GoStatement statement = forStatement.getInitialStatement();
        return statement != null && statement.getTextRange().contains(element.getTextRange());
    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.statements.GoForWithClausesStatement

        if (stStmt != null) {
            moveSimpleStatementOut(editor, stStmt);
            return;
        }

        GoForWithClausesStatement forStatement = findParentOfType(element, GoForWithClausesStatement.class);
        if (forStatement != null) {
            moveSimpleStatementOut(editor, forStatement);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.