mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fixes PSI
This commit is contained in:
@@ -58,7 +58,9 @@ public class PyAssignmentStatementImpl extends PyElementImpl implements PyAssign
|
||||
List<PyExpression> candidates = PyUtil.flattenedParens(psi_nodes); // put all possible tuples to one level
|
||||
List<PyExpression> targets = new ArrayList<PyExpression>();
|
||||
for (PyExpression expr : candidates) { // only filter out targets
|
||||
if (expr instanceof PyTargetExpression || expr instanceof PySubscriptionExpression) {
|
||||
if (expr instanceof PyTargetExpression ||
|
||||
expr instanceof PyReferenceExpression ||
|
||||
expr instanceof PySubscriptionExpression) {
|
||||
targets.add(expr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
sibling = []
|
||||
if sibling:
|
||||
sibling[0].text = 123
|
||||
@@ -0,0 +1,11 @@
|
||||
0(1) element: null
|
||||
1(2) element: PyAssignmentStatement
|
||||
2(3) WRITE ACCESS: sibling
|
||||
3(4) element: PyIfStatement
|
||||
4(5,10) READ ACCESS: sibling
|
||||
5(6) element: PyStatementList. Condition: sibling:true
|
||||
6(7) element: PyAssignmentStatement
|
||||
7(8) element: PySubscriptionExpression
|
||||
8(9) READ ACCESS: sibling
|
||||
9(10) READ ACCESS: text
|
||||
10() element: null
|
||||
@@ -74,6 +74,10 @@ public class PyControlFlowBuilderTest extends LightMarkedTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testAssignment2() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testAugAssignment() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user