Package org.python.pydev.parser.jython.ast

Examples of org.python.pydev.parser.jython.ast.Attribute


        return argsList;
    }

    private exprType createCallAttribute() {
        if (this.offsetAdapter instanceof IClassDefAdapter) {
            return new Attribute(new Name("self", Name.Load, false), new NameTok(this.methodName, NameTok.Attrib),
                    Attribute.Load);
        } else {
            return new Name(this.methodName, Name.Load, false);
        }
    }
View Full Code Here


            case JJTIMPORT:
                ret = new Import(null);
                break;
            case JJTDOT_OP:
                ret = new Attribute(null, null, Attribute.Load);
                break;
            case JJTSTAR_EXPR:
                ret = new Starred(null, Starred.Store);
                break;
View Full Code Here

                return n;

            case JJTDOT_OP:
                NameTok attr = makeName(NameTok.Attrib);
                value = (exprType) stack.popNode();
                Attribute attribute = (Attribute) n;
                attribute.value = value;
                attribute.attr = attr;
                return n;

            case JJTBEGIN_DEL_STMT:
View Full Code Here

            }
        }

        //initAttributes
        for (INodeAdapter adapter : attributes) {
            exprType target = new Attribute(new Name(NodeHelper.KEYWORD_SELF, Name.Load, false), new NameTok(
                    adapter.getName(), NameTok.Attrib), Attribute.Store);
            Assign initParam1 = new Assign(new exprType[] { target }, new Name(nodeHelper.getPublicAttr(adapter
                    .getName()), Name.Load, false));
            Assign initParam = initParam1;
            body.add(initParam);
View Full Code Here

    private Expr extractConstructorInit(IClassDefAdapter base) {
        FunctionDefAdapter init = base.getFirstInit();
        if (init != null) {
            if (!init.getArguments().hasOnlySelf()) {
                Attribute classInit = new Attribute(new Name(moduleAdapter.getBaseContextName(this.classAdapter,
                        base.getName()), Name.Load, false), new NameTok(NodeHelper.KEYWORD_INIT, NameTok.Attrib),
                        Attribute.Load);
                List<exprType> constructorParameters = init.getArguments().getSelfFilteredArgs();

                Name selfArg = new Name(NodeHelper.KEYWORD_SELF, Name.Load, false);
View Full Code Here

    }

    private stmtType[] createBody() {
        Name self = new Name(NodeHelper.KEYWORD_SELF, Name.Load, false);
        NameTok name = new NameTok(nodeHelper.getPrivateAttr(attributeName), NameTok.Attrib);
        Attribute returnAttribute = new Attribute(self, name, Attribute.Load);
        Return returnStmt = new Return(returnAttribute);

        return new stmtType[] { returnStmt };
    }
View Full Code Here

    }

    private stmtType[] createBody() {
        Name self = new Name(NodeHelper.KEYWORD_SELF, Name.Load, false);
        NameTok name = new NameTok(nodeHelper.getPrivateAttr(attributeName), NameTok.Attrib);
        Attribute attribute = new Attribute(self, name, Attribute.Del);
        Delete delete = new Delete(new exprType[] { attribute });

        return new stmtType[] { delete };
    }
View Full Code Here

                        state.checkMemory(this, base);

                        final IToken[] comps = manager.getCompletionsForModule(this, state);
                        modToks.addAll(Arrays.asList(comps));
                    } else if (c.bases[j] instanceof Attribute) {
                        Attribute attr = (Attribute) c.bases[j];
                        String s = NodeUtils.getFullRepresentationString(attr);

                        state = initialState.getCopy();
                        state.setActivationToken(s);
                        final IToken[] comps = manager.getCompletionsForModule(this, state);
View Full Code Here

        return NodeUtils.getLineDefinition(getRepresentationNode());
    }

    private SimpleNode getRepresentationNode() {
        if (ast instanceof Attribute) {
            Attribute attr = (Attribute) ast;
            while (attr != null) {
                String r = NodeUtils.getRepresentationString(attr);
                if (r != null && r.equals(rep)) {
                    return attr;
                }
View Full Code Here

        }
        return ret;
    }

    private Attribute createAttribute() {
        return new Attribute(new Name(baseClassName, Name.Load, false), new NameTok(method.getName(), NameTok.Attrib),
                Attribute.Load);
    }
View Full Code Here

TOP

Related Classes of org.python.pydev.parser.jython.ast.Attribute

Copyright © 2018 www.massapicom. 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.