(stmt *js.BlockStmt)
| 413 | } |
| 414 | |
| 415 | func (m *jsMinifier) minifyBlockStmt(stmt *js.BlockStmt) { |
| 416 | m.write(openBraceBytes) |
| 417 | m.needsSemicolon = false |
| 418 | for _, item := range stmt.List { |
| 419 | m.writeSemicolon() |
| 420 | m.minifyStmt(item) |
| 421 | } |
| 422 | m.write(closeBraceBytes) |
| 423 | m.needsSemicolon = false |
| 424 | } |
| 425 | |
| 426 | func (m *jsMinifier) minifyBlockAsStmt(blockStmt *js.BlockStmt) { |
| 427 | // minify block when statement is expected, i.e. semicolon if empty or remove braces for single statement |
no test coverage detected