(stmts)
| 16719 | return new torch.Argument('', this._def_stack[this._def_stack.length - 1]._merged_return_type); |
| 16720 | } |
| 16721 | emitStatements(stmts) { |
| 16722 | for (let i = 0; i < stmts.length; i++) { |
| 16723 | const stmt = stmts[i]; |
| 16724 | if (stmt instanceof ast.If) { |
| 16725 | this.emitIf(stmt); |
| 16726 | } else if (stmt instanceof ast.While) { |
| 16727 | this.emitWhile(stmt); |
| 16728 | } else if (stmt instanceof ast.For) { |
| 16729 | this.emitFor(stmt); |
| 16730 | } else if (stmt instanceof ast.Assign) { |
| 16731 | this.emitAssignment(stmt); |
| 16732 | } else if (stmt instanceof ast.AnnAssign) { |
| 16733 | this.emitAssignment(stmt); |
| 16734 | } else if (stmt instanceof ast.Expr) { |
| 16735 | this.emitSugaredExpr(stmt.value, 0); |
| 16736 | } else if (stmt instanceof ast.Return) { |
| 16737 | this.emitReturn(stmt); |
| 16738 | } else if (stmt instanceof ast.Pass) { |
| 16739 | // pass |
| 16740 | } else if (stmt instanceof ast.With) { |
| 16741 | this.emitWith(stmt); |
| 16742 | } else { |
| 16743 | throw new python.Error(`Unrecognized statement kind '${stmt.__class__.__name__}'.`); |
| 16744 | } |
| 16745 | if (this.exit_blocks.has(this.environment_stack.block())) { |
| 16746 | return; |
| 16747 | } |
| 16748 | } |
| 16749 | } |
| 16750 | emitWith(stmt) { |
| 16751 | const targets = stmt.items; |
| 16752 | const entered = []; |
no test coverage detected