(tree, n_binders, type_hint)
| 17404 | return out_val; |
| 17405 | } |
| 17406 | emitSugaredExpr(tree, n_binders, type_hint) { |
| 17407 | if (tree instanceof ast.Name) { // TK_VAR |
| 17408 | return this.environment_stack.getSugaredVar(tree.id); |
| 17409 | } else if (tree instanceof ast.Attribute) { |
| 17410 | const sv = this.emitSugaredExpr(tree.value, 1); |
| 17411 | return sv.attr(tree.range(), this.method, tree.attr); |
| 17412 | } else if (tree instanceof ast.Call) { // TK_APPLY |
| 17413 | return this.emitApplyExpr(tree, n_binders, type_hint); |
| 17414 | } if (tree instanceof ast.Subscript) { |
| 17415 | return this.emitSubscript(tree, type_hint); |
| 17416 | } |
| 17417 | return new torch._C.SimpleValue(this.emitSimpleExpr(tree, type_hint)); |
| 17418 | } |
| 17419 | emitApplyExpr(apply, n_binders, type_hint) { |
| 17420 | type_hint = type_hint || null; |
| 17421 | const sv = this.emitSugaredExpr(apply.func, 1); |
no test coverage detected