func NewBlockStatement(pos int, line int) *BlockStatement {
	return &BlockStatement{
		NodeType: NodeBlock,
		Loc:      Loc{pos, line},
	}
}
NewBlockStatement instanciates a new block node.
package ast
import (
	"fmt"
	"strconv"
)
type Node interface {
	Type() NodeType
	Location() Loc
	String() string
	Accept(Visitor) interface{}
}
type Visitor interface {
	VisitProgram(*Program) interface{}
	VisitMustache(*MustacheStatement) interface{}
	VisitBlock(*BlockStatement) interface{}
	VisitPartial(*PartialStatement) interface{}
	VisitContent(*ContentStatement) interface{}
	VisitComment(*CommentStatement) interface{}
	VisitExpression(*Expression) interface{}
	VisitSubExpression(*SubExpression) interface{}
	VisitPath(*PathExpression) interface{}
	VisitString(*StringLiteral) interface{}
	VisitBoolean(*BooleanLiteral) interface{}
	VisitNumber(*NumberLiteral) interface{}
	VisitHash(*Hash) interface{}
	VisitHashPair(*HashPair) interface{}
}
type NodeType int
func (t NodeType) Type() NodeType {
	return t
}
const (
	NodeProgram NodeType = iota
	NodeMustache
	NodeBlock
	NodePartial
	NodeContent
	NodeComment
	NodeExpression
	NodeSubExpression
	NodePath
	NodeBoolean
	NodeNumber
	NodeString
	NodeHash
	NodeHashPair
)
type Loc struct {
	Pos  int  
	Line int  
}
func (l Loc) Location() Loc {
	return l
}
type Strip struct {
	Open  bool
	Close bool
	OpenStandalone   bool
	CloseStandalone  bool
	InlineStandalone bool
}
func NewStrip(openStr, closeStr string) *Strip {
	return &Strip{
		Open:  (len(openStr) > 2) && openStr[2] == '~',
		Close: (len(closeStr) > 2) && closeStr[len(closeStr)-3] == '~',
	}
}
func NewStripForStr(str string) *Strip {
	return &Strip{
		Open:  (len(str) > 2) && str[2] == '~',
		Close: (len(str) > 2) && str[len(str)-3] == '~',
	}
}
func (s *Strip) String() string {
	return fmt.Sprintf("Open: %t, Close: %t, OpenStandalone: %t, CloseStandalone: %t, InlineStandalone: %t", s.Open, s.Close, s.OpenStandalone, s.CloseStandalone, s.InlineStandalone)
}
type Program struct {
	NodeType
	Loc
	Body        []Node  
	BlockParams []string
	Chained     bool
	Strip *Strip
}
func NewProgram(pos int, line int) *Program {
	return &Program{
		NodeType: NodeProgram,
		Loc:      Loc{pos, line},
	}
}
func (node *Program) String() string {
	return fmt.Sprintf("Program{Pos: %d}", node.Loc.Pos)
}
func (node *Program) Accept(visitor Visitor) interface{} {
	return visitor.VisitProgram(node)
}
func (node *Program) AddStatement(statement Node) {
	node.Body = append(node.Body, statement)
}
type MustacheStatement struct {
	NodeType
	Loc
	Unescaped  bool
	Expression *Expression
	Strip *Strip
}
func NewMustacheStatement(pos int, line int, unescaped bool) *MustacheStatement {
	return &MustacheStatement{
		NodeType:  NodeMustache,
		Loc:       Loc{pos, line},
		Unescaped: unescaped,
	}
}
func (node *MustacheStatement) String() string {
	return fmt.Sprintf("Mustache{Pos: %d}", node.Loc.Pos)
}
func (node *MustacheStatement) Accept(visitor Visitor) interface{} {
	return visitor.VisitMustache(node)
}
type BlockStatement struct {
	NodeType
	Loc
	Expression *Expression
	Program *Program
	Inverse *Program
	OpenStrip    *Strip
	InverseStrip *Strip
	CloseStrip   *Strip
}