}}}
(context *funcContext, reg int, expr *ast.StringConcatOpExpr, ec *expcontext)
| 1451 | } // }}} |
| 1452 | |
| 1453 | func compileStringConcatOpExpr(context *funcContext, reg int, expr *ast.StringConcatOpExpr, ec *expcontext) { // {{{ |
| 1454 | code := context.Code |
| 1455 | crange := 1 |
| 1456 | for current := expr.Rhs; current != nil; { |
| 1457 | if ex, ok := current.(*ast.StringConcatOpExpr); ok { |
| 1458 | crange += 1 |
| 1459 | current = ex.Rhs |
| 1460 | } else { |
| 1461 | current = nil |
| 1462 | } |
| 1463 | } |
| 1464 | a := savereg(ec, reg) |
| 1465 | basereg := reg |
| 1466 | reg += compileExpr(context, reg, expr.Lhs, ecnone(0)) |
| 1467 | reg += compileExpr(context, reg, expr.Rhs, ecnone(0)) |
| 1468 | for pc := code.LastPC(); pc != 0 && opGetOpCode(code.At(pc)) == OP_CONCAT; pc-- { |
| 1469 | code.Pop() |
| 1470 | } |
| 1471 | code.AddABC(OP_CONCAT, a, basereg, basereg+crange, sline(expr)) |
| 1472 | } // }}} |
| 1473 | |
| 1474 | func compileUnaryOpExpr(context *funcContext, reg int, expr ast.Expr, ec *expcontext) { // {{{ |
| 1475 | opcode := 0 |
no test coverage detected
searching dependent graphs…