(vartok)
| 1277 | |
| 1278 | # Return the token which the value is assigned to |
| 1279 | def getAssignedVariableToken(vartok): |
| 1280 | if not vartok: |
| 1281 | return None |
| 1282 | parent = vartok.astParent |
| 1283 | while parent and parent.isArithmeticalOp: |
| 1284 | parent = parent.astParent |
| 1285 | if parent and parent.isAssignmentOp: |
| 1286 | return parent.astOperand1 |
| 1287 | return None |
| 1288 | |
| 1289 | # If the value is used as a return value, return the function definition |
| 1290 | def getFunctionUsingReturnValue(valueToken): |