Examples of GoLiteralFunction


Examples of ro.redeul.google.go.lang.psi.expressions.literals.GoLiteralFunction

                      "   f := func() int {\n" +
                      "            return 3\n" +
                      "        };\n" +
                      "}"));

        GoLiteralFunction lit =
            getAs(GoLiteralFunction.class,
                  castAs(GoLiteralExpression.class, 0,
                         castAs(GoShortVarDeclaration.class, 0,
                                get(
                                    childAt(0,
                                            file.getFunctions()
                                    ).getBlock()
                                ).getStatements()
                         ).getExpressions()
                  ).getLiteral());

        assertNotNull(lit.getResults());
        assertNotNull(lit.getParameters());
        assertNotNull(lit.getBlock());

        assertEquals("int", castAs(GoFunctionParameter.class, 0, lit.getResults()).getText());
    }
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.