func CompileData(input []byte, filename string, options Options) (*template.Template, error) {
	comp := New()
	comp.Options = options
	err := comp.ParseData(input, filename)
	if err != nil {
		return nil, err
	}
	return comp.Compile()
}
Compile parses and compiles the supplied amber template []byte.
Returns corresponding Go Template (html/templates) instance.
Necessary runtime functions will be injected and the template will be ready to be executed.
package amber
import (
	"bytes"
	"container/list"
	"errors"
	"fmt"
	"go/ast"
	gp "go/parser"
	gt "go/token"
	"html/template"
	"io"
	"net/http"
	"os"
	"path/filepath"
	"reflect"
	"regexp"
	"sort"
	"strconv"
	"strings"
	"github.com/eknkc/amber/parser"
)
var builtinFunctions = [...]string{
	"len",
	"print",
	"printf",
	"println",
	"urlquery",
	"js",
	"json",
	"index",
	"html",
	"unescaped",
}
const (
	dollar = "__DOLLAR__"
)
type Compiler struct {
	Options
	filename     string
	node         parser.Node
	indentLevel  int
	newline      bool
	buffer       *bytes.Buffer
	tempvarIndex int
	mixins       map[string]*parser.Mixin
}
func New() *Compiler {
	compiler := new(Compiler)
	compiler.filename = ""
	compiler.tempvarIndex = 0
	compiler.PrettyPrint = true
	compiler.Options = DefaultOptions
	compiler.mixins = make(map[string]*parser.Mixin)
	return compiler
}
type Options struct {
	PrettyPrint bool
	LineNumbers bool
	VirtualFilesystem http.FileSystem
}
type DirOptions struct {
	Ext string
	Recursive bool
}
var DefaultOptions = Options{true, false, nil}
var DefaultDirOptions = DirOptions{".amber", true}
func Compile(input string, options Options) (*template.Template, error) {
	comp := New()
	comp.Options = options
	err := comp.Parse(input)
	if err != nil {
		return nil, err
	}
	return comp.Compile()
}