| 442 | innames = { out.name for out in node.inputs } |
| 443 | |
| 444 | def find_stores_in_tokens(tokens: list[lexer.Token], callback: Callable[[lexer.Token], None]) -> None: |
| 445 | while tokens and tokens[0].kind == "COMMENT": |
| 446 | tokens = tokens[1:] |
| 447 | if len(tokens) < 4: |
| 448 | return |
| 449 | if tokens[1].kind == "EQUALS": |
| 450 | if tokens[0].kind == "IDENTIFIER": |
| 451 | name = tokens[0].text |
| 452 | if name in outnames or name in innames: |
| 453 | callback(tokens[0]) |
| 454 | #Passing the address of a local is also a definition |
| 455 | for idx, tkn in enumerate(tokens): |
| 456 | if tkn.kind == "AND": |
| 457 | name_tkn = tokens[idx+1] |
| 458 | if name_tkn.text in outnames: |
| 459 | callback(name_tkn) |
| 460 | |
| 461 | def visit(stmt: Stmt) -> None: |
| 462 | if isinstance(stmt, IfStmt): |