" if True:\n" +
" a = \\\n" +
"xx\n" +
" else:\n" +
" pass");
Scopes scopes = ScopesParser.createScopes(doc);
assertEquals("" +
"[1 [2 #comment 2]\n" +
"[4 class Foo([3 object 3]):\n"
+
" [5 [9 def method([6 self, a=([7 bb,([8 cc,dd 8]) 7]) 6]):\n" +
" [10 [11 '''\n"
+
" multi string\n" +
" ''' 4] 5] 9] 10] 11]\n" +
"[12 class Class2:\n"
+
" [13 [14 if True:\n" +
" [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));
}