func (v *evalVisitor) popBlock() *ast.BlockStatement {
	if len(v.blocks) == 0 {
		return nil
	}
	var result *ast.BlockStatement
	result, v.blocks = v.blocks[len(v.blocks)-1], v.blocks[:len(v.blocks)-1]
	return result
}
popBlock pops last block statement from stack
package raymond
import (
	"bytes"
	"fmt"
	"reflect"
	"strconv"
	"strings"
	"github.com/aymerick/raymond/ast"
)
var (
	errorType       = reflect.TypeOf((*error)(nil)).Elem()
	fmtStringerType = reflect.TypeOf((*fmt.Stringer)(nil)).Elem()
	zero reflect.Value
)
type evalVisitor struct {
	tpl *Template
	ctx []reflect.Value
	dataFrame *DataFrame
	blockParams []map[string]interface{}
	blocks []*ast.BlockStatement
	exprs []*ast.Expression
	exprFunc map[*ast.Expression]bool
	curNode ast.Node
}
func newEvalVisitor(tpl *Template, ctx interface{}, privData *DataFrame) *evalVisitor {
	frame := privData
	if frame == nil {
		frame = NewDataFrame()
	}
	return &evalVisitor{
		tpl:       tpl,
		ctx:       []reflect.Value{reflect.ValueOf(ctx)},
		dataFrame: frame,
		exprFunc:  make(map[*ast.Expression]bool),
	}
}
func (v *evalVisitor) at(node ast.Node) {
	v.curNode = node
}
func (v *evalVisitor) pushCtx(ctx reflect.Value) {
	v.ctx = append(v.ctx, ctx)
}
func (v *evalVisitor) popCtx() reflect.Value {
	if len(v.ctx) == 0 {
		return zero
	}
	var result reflect.Value
	result, v.ctx = v.ctx[len(v.ctx)-1], v.ctx[:len(v.ctx)-1]
	return result
}
func (v *evalVisitor) rootCtx() reflect.Value {
	return v.ctx[0]
}
func (v *evalVisitor) curCtx() reflect.Value {
	return v.ancestorCtx(0)
}
func (v *evalVisitor) ancestorCtx(depth int) reflect.Value {
	index := len(v.ctx) - 1 - depth
	if index < 0 {
		return zero
	}
	return v.ctx[index]
}
func (v *evalVisitor) setDataFrame(frame *DataFrame) {
	v.dataFrame = frame
}
func (v *evalVisitor) popDataFrame() {
	v.dataFrame = v.dataFrame.parent
}
func (v *evalVisitor) pushBlockParams(params map[string]interface{}) {
	v.blockParams = append(v.blockParams, params)
}
func (v *evalVisitor) popBlockParams() map[string]interface{} {
	var result map[string]interface{}
	if len(v.blockParams) == 0 {
		return result
	}
	result, v.blockParams = v.blockParams[len(v.blockParams)-1], v.blockParams[:len(v.blockParams)-1]
	return result
}
func (v *evalVisitor) blockParam(name string) interface{} {
	for i := len(v.blockParams) - 1; i >= 0; i-- {
		for k, v := range v.blockParams[i] {
			if name == k {
				return v
			}
		}
	}
	return nil
}
func (v *evalVisitor) pushBlock(block *ast.BlockStatement) {
	v.blocks = append(v.blocks, block)
}