func (cc *CodeChunk) NewChunk() *CodeChunk {
	ch := &CodeChunk{parent: cc, indent: cc.indent}
	cc.chunks = append(cc.chunks, ch)
	return ch
}
Created a new empty chunk whose parent is the receiver.
package have
import (
	"bytes"
	"fmt"
	"regexp"
	"sort"
	"strconv"
	"strings"
)
type CodeChunk struct {
	chunks []*CodeChunk
	code   string
	blockOfStmts bool
	parent *CodeChunk
	indent string
}
func (cc *CodeChunk) ReadAll() string {
	return cc.readAll("")
}
func (cc *CodeChunk) readAll(indent string) string {
	if cc == forcedIndentChunk {
		return indent
	}
	if cc.code != "" {
		return cc.code
	}
	buf := bytes.Buffer{}
	for _, chk := range cc.chunks {
		trailer := ""
		if cc.blockOfStmts {
			trailer = "\t"
			buf.WriteString(indent + trailer)
		}
		buf.WriteString(chk.readAll(indent + trailer))
	}
	return buf.String()
}
func (cc *CodeChunk) AddString(s string) {
	cc.chunks = append(cc.chunks, cc.NewStrChunk(s))
}
func (cc *CodeChunk) AddChunks(chunks ...*CodeChunk) {
	cc.chunks = append(cc.chunks, chunks...)
}
func (cc *CodeChunk) NewStrChunk(s string) *CodeChunk {
	ch := &CodeChunk{code: s, parent: cc}
	return ch
}