func New(name string) *Tree {
	return &Tree{
		Name:  name,
		mixin: map[string]*MixinNode{},
		block: map[string]*ListNode{},
	}
}
New allocates a new parse tree with the given name.
package jade
import (
	"fmt"
	"runtime"
)
type Tree struct {
	Name string     
	Root *ListNode  
	text string     
	lex       *lexer
	token     [3]item  
	peekCount int
	tab       int  
	mixin map[string]*MixinNode
	block map[string]*ListNode
}
func (t *Tree) Copy() *Tree {
	if t == nil {
		return nil
	}
	return &Tree{
		Name: t.Name,
		Root: t.Root.CopyList(),
		text: t.text,
	}
}
func (t *Tree) next() item {
	if t.peekCount > 0 {
		t.peekCount--
	} else {
		t.token[0] = t.lex.nextItem()
	}
	return t.token[t.peekCount]
}
func (t *Tree) backup() {
	t.peekCount++
}
func (t *Tree) backup2(t1 item) {
	t.token[1] = t1
	t.peekCount = 2
}
func (t *Tree) backup3(t2, t1 item) {  
	t.token[1] = t1
	t.token[2] = t2
	t.peekCount = 3
}
func (t *Tree) peek() item {
	if t.peekCount > 0 {
		return t.token[t.peekCount-1]
	}
	t.peekCount = 1
	t.token[0] = t.lex.nextItem()
	return t.token[0]
}
func (t *Tree) nextNonSpace() (token item) {
	for {
		token = t.next()
		if token.typ != itemIdent && token.typ != itemEndL && token.typ != itemEmptyLine {
			break
		}
	}
	return token
}
func (t *Tree) peekNonSpace() (token item) {
	for {
		token = t.next()
		if token.typ != itemIdent && token.typ != itemEndL && token.typ != itemEmptyLine {
			break
		}
	}
	t.backup()
	return token
}
func (t *Tree) errorf(format string, args ...interface{}) {
	t.Root = nil
	format = fmt.Sprintf("template:%d: %s", t.token[0].line, format)
	panic(fmt.Errorf(format, args...))
}
func (t *Tree) recover(errp *error) {
	e := recover()
	if e != nil {
		if _, ok := e.(runtime.Error); ok {
			panic(e)
		}
		if t != nil {
			t.lex.drain()
			t.lex = nil
		}
		*errp = e.(error)
	}
}
func (t *Tree) Parse(text string) (tree *Tree, err error) {
	defer t.recover(&err)
	t.lex = lex(t.Name, text)
	t.text = text
	t.topParse()
	t.lex = nil
	return t, nil
}