(tok)
| 1259 | |
| 1260 | |
| 1261 | def isNoReturnScope(tok): |
| 1262 | if tok is None or tok.str != '}': |
| 1263 | return False |
| 1264 | if tok.previous is None or tok.previous.str != ';': |
| 1265 | return False |
| 1266 | if simpleMatch(tok.previous.previous, 'break ;'): |
| 1267 | return True |
| 1268 | prev = tok.previous.previous |
| 1269 | while prev and prev.str not in ';{}': |
| 1270 | if prev.str in '])': |
| 1271 | prev = prev.link |
| 1272 | prev = prev.previous |
| 1273 | if prev and prev.next.str in ['throw', 'return']: |
| 1274 | return True |
| 1275 | return False |
| 1276 | |
| 1277 | |
| 1278 | # Return the token which the value is assigned to |
no test coverage detected