| 1288 | |
| 1289 | # If the value is used as a return value, return the function definition |
| 1290 | def getFunctionUsingReturnValue(valueToken): |
| 1291 | if not valueToken: |
| 1292 | return None |
| 1293 | if not valueToken.astParent: |
| 1294 | return None |
| 1295 | operator = valueToken.astParent |
| 1296 | if operator.str == 'return': |
| 1297 | return operator.scope.function |
| 1298 | if operator.isArithmeticalOp: |
| 1299 | return getFunctionUsingReturnValue(operator) |
| 1300 | return None |
| 1301 | |
| 1302 | # Return true if the token follows a specific sequence of token str values |
| 1303 | def tokenFollowsSequence(token, sequence): |