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

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


    protected int getLine() {
        SimpleNode node = adapter.getASTNode();
        if (nodeHelper.isClassDef(node)) {
            ClassDef classNode = (ClassDef) node;
            Str strNode = NodeUtils.getNodeDocStringNode(node);

            if (strNode != null) {
                return NodeUtils.getLineEnd(strNode);
            }
View Full Code Here


                        && call.args.length == 2) {
                    String rep = NodeUtils.getFullRepresentationString(call.args[0]);
                    if (rep.equals(activationToken)) {
                        exprType node = call.args[1];
                        if (node instanceof Str) {
                            Str str = (Str) node;
                            String attrName = str.s;
                            if (NodeUtils.isValidNameRepresentation(attrName)) {
                                comps.add(new SourceToken(node, attrName, "", "", "",
                                        IToken.TYPE_OBJECT_FOUND_INTERFACE));
                            }
View Full Code Here

        assertEquals(15, names.get(0).beginColumn);
    }

    public void test4() throws Exception {
        ArrayList<Object> c = new ArrayList<Object>();
        Str str = new Str("\nfoo\nfoo\n", Str.TripleSingle, false, false, false);
        str.beginLine = 5;
        str.beginColumn = 0;
        c.add(str);

        List<ASTEntry> names = ScopeAnalysis.getStringOccurrences("foo", str);
View Full Code Here

        assertEquals(1, names.get(1).node.beginColumn);
    }

    public void test5() throws Exception {
        ArrayList<Object> c = new ArrayList<Object>();
        Str str = new Str("\nfoo\n\n\nfoo\n", Str.TripleSingle, false, false, false);
        str.beginLine = 5;
        str.beginColumn = 0;
        c.add(str);

        List<ASTEntry> names = ScopeAnalysis.getStringOccurrences("foo", str);
View Full Code Here

        stmtType[] bodyArray = newBody.toArray(new stmtType[newBody.size()]);
        return bodyArray;
    }

    public Str createString(String string) {
        return new Str(string, Str.TripleSingle, false, false, false);
    }
View Full Code Here

TOP

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

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.