Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var All = exec.StatementSet{}
All holds all built-in statements.
Functions ¶
This section is empty.
Types ¶
type AutoescapeStmt ¶
type AutoescapeStmt struct { Wrapper *parse.WrapperNode Autoescape bool }
func (*AutoescapeStmt) Execute ¶
func (stmt *AutoescapeStmt) Execute(r *exec.Renderer, tag *parse.StatementBlockNode)
func (*AutoescapeStmt) Position ¶
func (stmt *AutoescapeStmt) Position() *parse.Token
func (*AutoescapeStmt) String ¶
func (stmt *AutoescapeStmt) String() string
type BlockInfos ¶
type BlockInfos struct { Block *BlockStmt Renderer *exec.Renderer Blocks []*parse.WrapperNode Root *parse.TemplateNode }
type BlockStmt ¶
type ExtendsStmt ¶
func (*ExtendsStmt) Position ¶
func (stmt *ExtendsStmt) Position() *parse.Token
func (*ExtendsStmt) String ¶
func (stmt *ExtendsStmt) String() string
type FilterStmt ¶
type FilterStmt struct {
// contains filtered or unexported fields
}
FilterStmt is a statement that applies a filter chain to the output of a previous statement.
func (*FilterStmt) Execute ¶
func (stmt *FilterStmt) Execute(r *exec.Renderer, tag *parse.StatementBlockNode)
Execute executes the filter statement.
func (*FilterStmt) Position ¶
func (stmt *FilterStmt) Position() *parse.Token
Position returns the token position of the statement.
func (*FilterStmt) String ¶
func (stmt *FilterStmt) String() string
type ForStmt ¶
type ForStmt struct {
// contains filtered or unexported fields
}
type FromImportStmt ¶
type FromImportStmt struct { Location *parse.Token Filename string FilenameExpr parse.Expression WithContext bool Template *parse.TemplateNode As map[string]string Macros map[string]*parse.MacroNode // alias/name -> macro instance }
FromImportStmt is a statement that imports macros from another template.
func (*FromImportStmt) Execute ¶
func (stmt *FromImportStmt) Execute(r *exec.Renderer, tag *parse.StatementBlockNode)
Execute executes the import statement.
func (*FromImportStmt) Position ¶
func (stmt *FromImportStmt) Position() *parse.Token
Position returns the position of the statement.
func (*FromImportStmt) String ¶
func (stmt *FromImportStmt) String() string
type IfStmt ¶
type ImportStmt ¶
type ImportStmt struct { Location *parse.Token Filename string FilenameExpr parse.Expression As string WithContext bool Template *parse.TemplateNode }
ImportStmt is a statement that imports a template and makes its macros available.
func (*ImportStmt) Execute ¶
func (stmt *ImportStmt) Execute(r *exec.Renderer, tag *parse.StatementBlockNode)
Execute executes the import statement.
func (*ImportStmt) Position ¶
func (stmt *ImportStmt) Position() *parse.Token
Position returns the position of the statement.
func (*ImportStmt) String ¶
func (stmt *ImportStmt) String() string
type IncludeEmptyStmt ¶
type IncludeEmptyStmt struct{}
type IncludeStmt ¶
type IncludeStmt struct { Location *parse.Token Filename string FilenameExpr parse.Expression Template *parse.TemplateNode IgnoreMissing bool WithContext bool IsEmpty bool }
IncludeStmt is a statement that includes another template.
func (*IncludeStmt) Execute ¶
func (stmt *IncludeStmt) Execute(r *exec.Renderer, tag *parse.StatementBlockNode)
Execute executes the include statement.
func (*IncludeStmt) Position ¶
func (stmt *IncludeStmt) Position() *parse.Token
Position returns the token position of the statement.
func (*IncludeStmt) String ¶
func (stmt *IncludeStmt) String() string
type LoopInfos ¶
type LoopInfos struct { Index int `gonja:"index"` Index0 int `gonja:"index0"` RevIndex int `gonja:"revindex"` RevIndex0 int `gonja:"revindex0"` First bool `gonja:"first"` Last bool `gonja:"last"` Length int `gonja:"length"` Depth int `gonja:"depth"` Depth0 int `gonja:"depth0"` PrevItem exec.Value `gonja:"previtem"` NextItem exec.Value `gonja:"nextitem"` // contains filtered or unexported fields }
type MacroStmt ¶
type RawStmt ¶
type SetStmt ¶
type SetStmt struct { Location *parse.Token Target parse.Expression Expression parse.Expression }