}}}
(context *funcContext, stmt *ast.LocalAssignStmt)
| 854 | } // }}} |
| 855 | |
| 856 | func compileLocalAssignStmt(context *funcContext, stmt *ast.LocalAssignStmt) { // {{{ |
| 857 | reg := context.RegTop() |
| 858 | if len(stmt.Names) == 1 && len(stmt.Exprs) == 1 { |
| 859 | if _, ok := stmt.Exprs[0].(*ast.FunctionExpr); ok { |
| 860 | context.RegisterLocalVar(stmt.Names[0]) |
| 861 | compileRegAssignment(context, stmt.Names, stmt.Exprs, reg, len(stmt.Names), sline(stmt)) |
| 862 | return |
| 863 | } |
| 864 | } |
| 865 | |
| 866 | compileRegAssignment(context, stmt.Names, stmt.Exprs, reg, len(stmt.Names), sline(stmt)) |
| 867 | for _, name := range stmt.Names { |
| 868 | context.RegisterLocalVar(name) |
| 869 | } |
| 870 | } // }}} |
| 871 | |
| 872 | func compileReturnStmt(context *funcContext, stmt *ast.ReturnStmt) { // {{{ |
| 873 | lenexprs := len(stmt.Exprs) |
no test coverage detected
searching dependent graphs…