func (n Float64Declr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("float64Declr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
WriteTo writes to the provided writer the variable declaration.
package gen
import (
	"bytes"
	"fmt"
	"io"
	"strconv"
	"strings"
	tm "text/template"
	"github.com/influx6/moz/gen/templates"
)
var (
	CommaWriter = NewConstantWriter([]byte(","))
	NewlineWriter = NewConstantWriter([]byte("\n"))
	CommaSpacedWriter = NewConstantWriter([]byte(", "))
	PeriodWriter = NewConstantWriter([]byte("."))
)
type WriteDirective struct {
	Writer       io.WriterTo `ast:"-,!optional"`        
	Dir          string      `ast:"dir,optional"`       
	FileName     string      `ast:"filename,optional"`  
	DontOverride bool        `ast:"dont_override,optional"`
	Before       func() error
	After        func() error
}
type WriterToMap interface {
	Map(...io.WriterTo) io.WriterTo
}
type MapOut func(io.Writer, ...io.WriterTo) (int64, error)
type WritersTo []io.WriterTo
func (d WritersTo) WriteTo(w io.Writer) (int64, error) {
	wc := NewWriteCounter(w)
	for _, item := range d {
		if _, err := item.WriteTo(wc); IsNotDrainError(err) {
			return wc.Written(), err
		}
	}
	return wc.Written(), nil
}
func (d WritersTo) Map(mp WriterToMap) io.WriterTo {
	return mp.Map(d...)
}
type MapAnyWriter struct {
	Map MapOut
	Dcl []io.WriterTo
}
func (m MapAnyWriter) WriteTo(to io.Writer) (int64, error) {
	return m.Map(to, m.Dcl...)
}
type MapAny struct {
	MapFn MapOut
}
func (mapper MapAny) Map(dls ...io.WriterTo) io.WriterTo {
	return MapAnyWriter{Map: mapper.MapFn, Dcl: dls}
}
var NewlineMapper = MapAny{MapFn: func(to io.Writer, declrs ...io.WriterTo) (int64, error) {
	wc := NewWriteCounter(to)
	total := len(declrs) - 1
	for index, declr := range declrs {
		if _, err := declr.WriteTo(wc); err != nil && err != io.EOF {
			return 0, err
		}
		if index < total {
			NewlineWriter.WriteTo(wc)
		}
	}
	return wc.Written(), nil
}}
var DotMapper = MapAny{MapFn: func(to io.Writer, declrs ...io.WriterTo) (int64, error) {
	wc := NewWriteCounter(to)
	total := len(declrs) - 1
	for index, declr := range declrs {
		if _, err := declr.WriteTo(wc); err != nil && err != io.EOF {
			return 0, err
		}
		if index < total {
			PeriodWriter.WriteTo(wc)
		}
	}
	return wc.Written(), nil
}}
var CommaSpacedMapper = MapAny{MapFn: func(to io.Writer, declrs ...io.WriterTo) (int64, error) {
	wc := NewWriteCounter(to)
	total := len(declrs) - 1
	for index, declr := range declrs {
		if _, err := declr.WriteTo(wc); err != nil && err != io.EOF {
			return 0, err
		}
		if index < total {
			CommaSpacedWriter.WriteTo(wc)
		}
	}
	return wc.Written(), nil
}}
var CommaMapper = MapAny{MapFn: func(to io.Writer, declrs ...io.WriterTo) (int64, error) {
	wc := NewWriteCounter(to)
	total := len(declrs) - 1
	for index, declr := range declrs {
		if _, err := declr.WriteTo(wc); err != nil && err != io.EOF {
			return 0, err
		}
		if index < total {
			CommaWriter.WriteTo(wc)
		}
	}
	return wc.Written(), nil
}}
var (
	defaultMapType = bytes.NewBuffer([]byte("map"))
)
type MapDeclr struct {
	Type    NameDeclr
	Value   NameDeclr
	MapType io.WriterTo
	Values  map[string]io.WriterTo
}
func (tx MapDeclr) WriteTo(w io.Writer) (int64, error) {
	wc := NewWriteCounter(NewNoBOM(w))
	tml, err := ToTemplate("mapDeclr", templates.Must("map.tml"), nil)
	if err != nil {
		return 0, err
	}
	values := make(map[string]string)
	var b bytes.Buffer
	for name, item := range tx.Values {
		b.Reset()
		if _, err := item.WriteTo(&b); IsNotDrainError(err) {
			return 0, err
		}
		values[name] = b.String()
	}
	mapType := io.WriterTo(defaultMapType)
	if tx.MapType != nil {
		mapType = tx.MapType
	}
	var mapTypeName bytes.Buffer
	if _, err := mapType.WriteTo(&mapTypeName); IsNotDrainError(err) {
		return 0, err
	}
	var bind = struct {
		MapType string
		Type    string
		Value   string
		Values  map[string]string
	}{
		Values:  values,
		Type:    tx.Type.Name,
		Value:   tx.Value.Name,
		MapType: mapTypeName.String(),
	}
	if err := tml.Execute(wc, bind); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
type TextDeclr struct {
	Template string
	Name     string
	Binding  interface{}
	Funcs    tm.FuncMap
}
func (tx TextDeclr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := tm.New(tx.Name).Funcs(defaultFuncs).Funcs(tx.Funcs).Parse(tx.Template)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, tx.Binding); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
type SourceDeclr struct {
	Template *tm.Template
	Binding  interface{}
}
func (src SourceDeclr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	wc := NewWriteCounter(w)
	if err := src.Template.Execute(wc, src.Binding); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
type PackageDeclr struct {
	Name io.WriterTo `json:"name"`
	Body WritersTo   `json:"body"`
}
func (pkg PackageDeclr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("packageDeclr", templates.Must("package.tml"), nil)
	if err != nil {
		return 0, err
	}
	var named, body bytes.Buffer
	if _, err := pkg.Name.WriteTo(&named); IsNotDrainError(err) {
		return 0, err
	}
	if _, err := pkg.Body.WriteTo(&body); IsNotDrainError(err) {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Name string
		Body string
	}{
		Name: named.String(),
		Body: body.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
type TypeDeclr struct {
	TypeName string `json:"typeName"`
}
func (t TypeDeclr) String() string {
	return t.TypeName
}
func (t TypeDeclr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("typeDeclr", templates.Must("variable-type-only.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Type string
	}{
		Type: t.TypeName,
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
type NameDeclr struct {
	Name string `json:"name"`
}
func (n NameDeclr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("nameDeclr", templates.Must("name.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Name string
	}{
		Name: n.Name,
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
func (n NameDeclr) String() string {
	return n.Name
}
type RuneASCIIDeclr struct {
	Value rune `json:"value"`
}
func (n RuneASCIIDeclr) String() string {
	return strconv.QuoteRuneToASCII(n.Value)
}
func (n RuneASCIIDeclr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("runeASCIIDeclr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
type RuneGraphicsDeclr struct {
	Value rune `json:"value"`
}
func (n RuneGraphicsDeclr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("runeGraphicsDeclr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
func (n RuneGraphicsDeclr) String() string {
	return strconv.QuoteRuneToGraphic(n.Value)
}
type RuneDeclr struct {
	Value rune `json:"value"`
}
func (n RuneDeclr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("runeDeclr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
func (n RuneDeclr) String() string {
	return strconv.QuoteRune(n.Value)
}
type StringASCIIDeclr struct {
	Value string `json:"value"`
}
func (n StringASCIIDeclr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("stringASCIIDeclr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
func (n StringASCIIDeclr) String() string {
	return strconv.QuoteToASCII(n.Value)
}
type StringDeclr struct {
	Value string `json:"value"`
}
func (n StringDeclr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("stringDeclr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
func (n StringDeclr) String() string {
	return strconv.Quote(n.Value)
}
type BoolDeclr struct {
	Value bool `json:"value"`
}
func (n BoolDeclr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("boolDeclr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
func (n BoolDeclr) String() string {
	return strconv.FormatBool(n.Value)
}
type UIntBaseDeclr struct {
	Value uint64 `json:"value"`
	Base  int    `json:"base"`
}
func (n UIntBaseDeclr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("uintBaseDeclr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
func (n UIntBaseDeclr) String() string {
	return strconv.FormatUint(n.Value, n.Base)
}
type UInt64Declr struct {
	Value uint64 `json:"value"`
}
func (n UInt64Declr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("uint64Declr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
func (n UInt64Declr) String() string {
	return strconv.FormatUint(n.Value, 10)
}
type UInt32Declr struct {
	Value uint32 `json:"value"`
}
func (n UInt32Declr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("uint32Declr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
func (n UInt32Declr) String() string {
	return strconv.FormatUint(uint64(n.Value), 10)
}
type IntBaseDeclr struct {
	Value int64 `json:"value"`
	Base  int   `json:"base"`
}
func (n IntBaseDeclr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("intBaseDeclr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
func (n IntBaseDeclr) String() string {
	return strconv.FormatInt(n.Value, n.Base)
}
type Int64Declr struct {
	Value int64 `json:"value"`
}
func (n Int64Declr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("int64Declr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
func (n Int64Declr) String() string {
	return strconv.FormatInt(n.Value, 10)
}
type Int32Declr struct {
	Value int32 `json:"value"`
}
func (n Int32Declr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("int32Declr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
func (n Int32Declr) String() string {
	return strconv.FormatInt(int64(n.Value), 10)
}
type IntDeclr struct {
	Value int `json:"value"`
}
func (n IntDeclr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("intDeclr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
func (n IntDeclr) String() string {
	return strconv.Itoa(n.Value)
}
type FloatBaseDeclr struct {
	Value     float64 `json:"value"`
	Bitsize   int     `json:"base"`
	Precision int     `json:"precision"`
}
func (n FloatBaseDeclr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("floatBaseDeclr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
func (n FloatBaseDeclr) String() string {
	return strconv.FormatFloat(n.Value, 'f', n.Precision, n.Bitsize)
}
type Float32Declr struct {
	Value float32 `json:"value"`
}
func (n Float32Declr) WriteTo(w io.Writer) (int64, error) {
	w = NewNoBOM(w)
	tml, err := ToTemplate("float32Declr", templates.Must("value.tml"), nil)
	if err != nil {
		return 0, err
	}
	wc := NewWriteCounter(w)
	if err := tml.Execute(wc, struct {
		Value string
	}{
		Value: n.String(),
	}); err != nil {
		return 0, err
	}
	return wc.Written(), nil
}
func (n Float32Declr) String() string {
	return strconv.FormatFloat(float64(n.Value), 'f', 4, 32)
}
type Float64Declr struct {
	Value float64 `json:"value"`
}