Examples of GoExpr


Examples of ro.redeul.google.go.lang.psi.expressions.GoExpr

            // TODO: should be str or byte slice
        }
    }

    private static void assertBoolParameter(Context ctx) {
        GoExpr expr = ctx.getNextParameter();
        if (expr != null) {
            // TODO: should be bool
        }
    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.expressions.GoExpr

            // TODO: should be bool
        }
    }

    private static void assertIntParameter(Context ctx) {
        GoExpr expr = ctx.getNextParameter();
        if (expr != null) {
            // TODO: should be int
        }
    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.expressions.GoExpr

            // TODO: should be int
        }
    }

    private static void assertFloatParameter(Context ctx) {
        GoExpr expr = ctx.getNextParameter();
        if (expr != null) {
            // TODO: should be float or complex
        }
    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.expressions.GoExpr

            this.isScanning = isScanning;
        }

        public GoExpr getNextParameter() {
            if (currentParameter < parameters.length) {
                GoExpr param = parameters[currentParameter++];
                if (!isScanning) {
                    // TODO: param should be a pointer
                }
                return param;
            }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.expressions.GoExpr

    }

    @NotNull
    @Override
    protected GoType[] resolveTypes() {
        GoExpr expression = getExpression();
        if (expression == null)
            return GoType.EMPTY_ARRAY;

        GoType[] basic = expression.getType();

        if ( basic.length == 1 && basic[0] instanceof GoTypeConstant ) {
            GoType myType = computeConstant((GoTypeConstant) basic[0]);
            return new GoType[]{myType};
        }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.expressions.GoExpr

    @Override
    @SuppressWarnings("ConstantConditions")
    public GoExpr getReceiveExpression() {

        GoExpr expr = findChildByClass(GoExpr.class);
        if (expr != null)
            return expr;

        GoAssignmentStatement assignmentStatement = getAssignment();
        if (assignmentStatement != null) {
            GoExpressionList expressionList = assignmentStatement.getRightSideExpressions();
            if (expressionList.getExpressions() != null && expressionList.getExpressions().length > 0)
                return expressionList.getExpressions()[0];

            return expr;
        }

        GoShortVarDeclaration declaration = getShortVarDeclaration();
        if (declaration != null) {
            GoExpr expressions[] = declaration.getExpressions();
            if (expressions.length > 0)
                return expressions[0];
        }

        return expr;
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.expressions.GoExpr

        super(node);
    }

    @Override
    public GoExpr getInnerExpression() {
        GoExpr childByClass = findChildByClass(GoExpr.class);
        // TODO: Why is this here ? It shouldn't be
        if (childByClass instanceof GoParenthesisedExpression)
            return ((GoParenthesisedExpression) childByClass).getInnerExpression();
        return childByClass;
    }
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.expressions.GoExpr

                    @Override
                    public void visitConstDeclaration(GoConstDeclaration declaration) {
                        if (resolvedIdent != null) {
                            GoType declaredType = types.fromPsiType(declaration.getIdentifiersType());
                            GoExpr expr = declaration.getExpression(resolvedIdent);

                            if (expr != null) {
                                GoType[] exprType = expr.getType();

                                if ((exprType.length != 1 || !(exprType[0] instanceof GoTypeConstant)))
                                    setData(new GoType[]{declaredType});

                                if (exprType.length == 1 && exprType[0] instanceof GoTypeConstant) {
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.expressions.GoExpr

                return type.getResultTypes();
            }

            @Override
            public GoType[] visitName(GoTypeName type) {
                GoExpr args[] = getArguments();
                if ( args.length != 1 )
                    return new GoType[]{type};

                GoType argType[] = args[0].getType();
                if ( argType.length != 1)
View Full Code Here

Examples of ro.redeul.google.go.lang.psi.expressions.GoExpr

                    if (!reference.canSee(identifier, referenceName))
                        continue;

                    GoType identifierType = identifiersType;
                    if (identifierType == GoType.Unknown) {
                        GoExpr expr = declaration.getExpression(identifier);
                        if (expr != null) {
                            GoType[] exprType = expr.getType();
                            if (exprType.length > 0 && exprType[0] != null)
                                identifierType = exprType[0];
                        }
                    }
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.