All holds all builtins statements for easier registeration
var All = exec.StatementSet{}
type AutoescapeStmt struct {
Wrapper *nodes.Wrapper
Autoescape bool
}
func (stmt *AutoescapeStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
func (stmt *AutoescapeStmt) Position() *tokens.Token
func (stmt *AutoescapeStmt) String() string
type BlockInfos struct {
Block *BlockStmt
Renderer *exec.Renderer
Blocks []*nodes.Wrapper
Root *nodes.Template
}
type BlockStmt struct {
Location *tokens.Token
Name string
}
func (stmt *BlockStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
func (stmt *BlockStmt) Position() *tokens.Token
func (stmt *BlockStmt) String() string
type ExtendsStmt struct {
Location *tokens.Token
Filename string
WithContext bool
}
func (node *ExtendsStmt) Execute(r *exec.Renderer) error
func (stmt *ExtendsStmt) Position() *tokens.Token
func (stmt *ExtendsStmt) String() string
type FilterStmt struct {
// contains filtered or unexported fields
}
func (node *FilterStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
func (stmt *FilterStmt) Position() *tokens.Token
func (stmt *FilterStmt) String() string
type ForStmt struct {
// contains filtered or unexported fields
}
func (node *ForStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) (forError error)
func (stmt *ForStmt) Position() *tokens.Token
func (stmt *ForStmt) String() string
type FromImportStmt struct {
Location *tokens.Token
Filename string
FilenameExpr nodes.Expression
WithContext bool
Template *nodes.Template
As map[string]string
Macros map[string]*nodes.Macro // alias/name -> macro instance
}
func (stmt *FromImportStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
func (stmt *FromImportStmt) Position() *tokens.Token
func (stmt *FromImportStmt) String() string
type IfStmt struct {
Location *tokens.Token
// contains filtered or unexported fields
}
func (node *IfStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
func (stmt *IfStmt) Position() *tokens.Token
func (stmt *IfStmt) String() string
type ImportStmt struct {
Location *tokens.Token
Filename string
FilenameExpr nodes.Expression
As string
WithContext bool
Template *nodes.Template
}
func (stmt *ImportStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
func (stmt *ImportStmt) Position() *tokens.Token
func (stmt *ImportStmt) String() string
type IncludeEmptyStmt struct{}
type IncludeStmt struct {
// tpl *Template
Location *tokens.Token
Filename string
FilenameExpr nodes.Expression
Template *nodes.Template
IgnoreMissing bool
WithContext bool
IsEmpty bool
}
func (stmt *IncludeStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
func (stmt *IncludeStmt) Position() *tokens.Token
func (stmt *IncludeStmt) String() string
type LoopInfos struct {
PrevItem *exec.Value
NextItem *exec.Value
// contains filtered or unexported fields
}
func (li *LoopInfos) Changed(value *exec.Value) bool
func (li *LoopInfos) Cycle(va *exec.VarArgs) *exec.Value
type MacroStmt struct {
*nodes.Macro
}
func (stmt *MacroStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
func (stmt *MacroStmt) String() string
func (stmt *MacroStmt) Position() *tokens.Token { return stmt.Location }
type RawStmt struct {
Data *nodes.Data
}
func (stmt *RawStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
func (stmt *RawStmt) Position() *tokens.Token
func (stmt *RawStmt) String() string
type SetStmt struct {
Location *tokens.Token
Target nodes.Expression
Expression nodes.Expression
}
func (stmt *SetStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
func (stmt *SetStmt) Position() *tokens.Token
func (stmt *SetStmt) String() string
type WithStmt struct {
Location *tokens.Token
Pairs map[string]nodes.Expression
Wrapper *nodes.Wrapper
}
func (stmt *WithStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
func (stmt *WithStmt) Position() *tokens.Token
func (stmt *WithStmt) String() string