func newUnexpectedValueError(tok token, expected string) error {
	return &UnexpectedValueError{newBaseError(tok.Pos), tok, expected}
}
newUnexpectedValueError returns a new UnexpectedPunctuationError
package parse
import "fmt"
type ParsingError interface {
	error
	Pos() Pos      
	Name() string  
	setTree(t *Tree)
}
type DebugError interface {
	error
	Debug() string  
}
type parseError struct {
	Pos
	name string  
}
func newParseError(p Pos) parseError {
	return parseError{p, ""}
}
func (e *parseError) Name() string {
	return e.name
}
func (e *parseError) setTree(t *Tree) {
	e.name = t.Name
}
func (e *parseError) sprintf(format string, a ...interface{}) string {
	res := fmt.Sprintf(format, a...)
	if e.name == "" {
		return fmt.Sprintf("parse: %s on line %d, column %d", res, e.Line, e.Offset)
	}
	return fmt.Sprintf("parse: %s on line %d, column %d in %s", res, e.Line, e.Offset, e.name)
}
type UnexpectedTokenError struct {
	baseError
	actual   token
	expected []tokenType
}
func (e *UnexpectedTokenError) Error() string {
	if len(e.expected) == 0 {
		return e.sprintf(`unexpected token "%s"`, e.actual.tokenType)
	}
	if len(e.expected) == 1 {
		return e.sprintf(`expected "%s", got "%s"`, e.expected[0], e.actual.tokenType)
	}
	s := "["
	for i, e := range e.expected {
		if i > 0 {
			s = s + ", "
		}
		s = s + e.String()
	}
	s = s + "]"
	return e.sprintf(`expected one of %s, got "%s"`, s, e.actual.tokenType)
}
func newUnexpectedTokenError(actual token, expected ...tokenType) error {
	return &UnexpectedTokenError{newBaseError(actual.Pos), actual, expected}
}
type UnclosedTagError struct {
	baseError
	tagName string
}
func (e *UnclosedTagError) Error() string {
	return e.sprintf(`unclosed tag "%s" starting`, e.tagName)
}
func newUnclosedTagError(tagName string, start Pos) error {
	return &UnclosedTagError{newBaseError(start), tagName}
}
type UnexpectedEOFError struct {
	baseError
}
func (e *UnexpectedEOFError) Error() string {
	return e.sprintf(`unexpected end of input`)
}
func newUnexpectedEOFError(tok token) error {
	return &UnexpectedEOFError{newBaseError(tok.Pos)}
}
type UnexpectedValueError struct {
	baseError
	tok token   
	val string  
}
func (e *UnexpectedValueError) Error() string {
	return e.sprintf(`unexpected "%s", expected "%s"`, e.tok.value, e.val)
}