Examples of stmtType


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

                "a.get(  ).foo\n" + //36 - 50
                "a.get( #comma.get()ent\n ).foo\n" + //50 - 80
                "a.\\\nget().foo\n" + //80
                "";
        Module mod = (Module) parseLegalDocStr(s);
        stmtType b0 = mod.body[0];

        Document doc = new Document(s);
        FindDuplicatesVisitor visitor = new FindDuplicatesVisitor(new TextSelection(doc, 0, 7), ((Expr) b0).value, doc);
        mod.accept(visitor);
        List<Tuple<ITextSelection, SimpleNode>> duplicates = visitor.getDuplicates();
View Full Code Here

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

        if (searchForward) {
            startLine += 1;
        } else {
            startLine -= 1;
        }
        stmtType goHere = FastParser.firstClassOrFunction(doc, startLine, searchForward, pyEdit.isCythonFile());

        NameTok node = getNameNode(goHere);
        if (node != null) {
            //ok, somewhere to go
            pyEdit.revealModelNode(node);
View Full Code Here

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

            ClassDef classNode = (ClassDef) node;
            for (stmtType statement : classNode.body) {
                if (nodeHelper.isInit(statement)) {
                    FunctionDef func = (FunctionDef) statement;
                    stmtType lastStmt = func.body[func.body.length - 1];
                    LastLineVisitor visitor = VisitorFactory.createVisitor(LastLineVisitor.class, lastStmt);
                    return visitor.getLastLine();
                }
            }
        }
View Full Code Here

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

            if (body != null) {
                try {
                    for (int i = 0; i < body.length; i++) {
                        GlobalModelVisitor visitor = new GlobalModelVisitor(GlobalModelVisitor.GLOBAL_TOKENS, "",
                                false, true);
                        stmtType stmt = body[i];
                        if (stmt == null) {
                            continue;
                        }
                        stmt.accept(visitor);
                        List<IToken> t = visitor.tokens;
                        for (Iterator<IToken> iterator = t.iterator(); iterator.hasNext();) {
                            SourceToken tok = (SourceToken) iterator.next();

                            //if it is found here, it is a local type
View Full Code Here

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

            SimpleNode element = iter.next();

            if (element instanceof FunctionDef) {
                FunctionDef f = (FunctionDef) element;
                for (int i = 0; i < f.body.length; i++) {
                    stmtType stmt = f.body[i];
                    if (stmt != null) {
                        importedModules.addAll(GlobalModelVisitor.getTokens(stmt, GlobalModelVisitor.ALIAS_MODULES,
                                moduleName, null, false));
                    }
                }
View Full Code Here

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

        check(all, 0, 1, 1, 1, 7);
        check(all, 1, 3, 1, 3, 7);
        check(all, 2, 5, 5, 5, 11);
        check(all, 3, 10, 1, 10, 7);

        stmtType found = FastParser.firstClassOrFunction(doc, 1, true, false);
        checkNode(3, 1, 3, 7, (ClassDef) found);

        found = FastParser.firstClassOrFunction(doc, 0, true, false);
        checkNode(1, 1, 1, 7, (ClassDef) found);
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.