Package org.python.pydev.parser.fastparser.ScopesParser

Examples of org.python.pydev.parser.fastparser.ScopesParser.Scopes.debugString()


                "        [9 [10 '''\n"
                +
                "    multi string\n" +
                "        ''' 10]\n" +
                " 4] 5] 8] 9] 1]" +
                "", scopes.debugString(doc)
                .toString());
    }

    public void testScopes2() throws Exception {
        Document doc = new Document("a().o");
View Full Code Here


        assertEquals("" +
                "[1 (1\n" +
                "\n" +
                "[3 class Bar([2 object 2]):\n" +
                "    [4 call 3] 4] 1]" +
                "", scopes
                .debugString(doc).toString());
    }

    public void testScopes3() throws Exception {
        Document doc = new Document("a(.o");
View Full Code Here

                "        [15 a = \\\n" +
                "xx 14] 15]\n" +
                "    [16 else:\n"
                +
                "        [17 pass 12] 13] 16] 17] 1]" +
                "", scopes.debugString(doc).toString());

        assertEquals(new Region(0, 8), scopes.getScopeForSelection(0, 2));
        assertEquals(new Region(19, 6), scopes.getScopeForSelection(20, 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.