...

Package statements

import "github.com/noirbizarre/gonja/builtins/statements"
Overview
Index

Overview ▾

Index ▾

Variables
type AutoescapeStmt
    func (stmt *AutoescapeStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
    func (stmt *AutoescapeStmt) Position() *tokens.Token
    func (stmt *AutoescapeStmt) String() string
type BlockInfos
type BlockStmt
    func (stmt *BlockStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
    func (stmt *BlockStmt) Position() *tokens.Token
    func (stmt *BlockStmt) String() string
type ExtendsStmt
    func (node *ExtendsStmt) Execute(r *exec.Renderer) error
    func (stmt *ExtendsStmt) Position() *tokens.Token
    func (stmt *ExtendsStmt) String() string
type FilterStmt
    func (node *FilterStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
    func (stmt *FilterStmt) Position() *tokens.Token
    func (stmt *FilterStmt) String() string
type ForStmt
    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
    func (stmt *FromImportStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
    func (stmt *FromImportStmt) Position() *tokens.Token
    func (stmt *FromImportStmt) String() string
type IfStmt
    func (node *IfStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
    func (stmt *IfStmt) Position() *tokens.Token
    func (stmt *IfStmt) String() string
type ImportStmt
    func (stmt *ImportStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
    func (stmt *ImportStmt) Position() *tokens.Token
    func (stmt *ImportStmt) String() string
type IncludeEmptyStmt
type IncludeStmt
    func (stmt *IncludeStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
    func (stmt *IncludeStmt) Position() *tokens.Token
    func (stmt *IncludeStmt) String() string
type LoopInfos
    func (li *LoopInfos) Changed(value *exec.Value) bool
    func (li *LoopInfos) Cycle(va *exec.VarArgs) *exec.Value
type MacroStmt
    func (stmt *MacroStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
    func (stmt *MacroStmt) String() string
type RawStmt
    func (stmt *RawStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
    func (stmt *RawStmt) Position() *tokens.Token
    func (stmt *RawStmt) String() string
type SetStmt
    func (stmt *SetStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
    func (stmt *SetStmt) Position() *tokens.Token
    func (stmt *SetStmt) String() string
type WithStmt
    func (stmt *WithStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error
    func (stmt *WithStmt) Position() *tokens.Token
    func (stmt *WithStmt) String() string

Package files

all.go autoescape.go block.go extends.go filter.go for.go if.go import.go include.go macro.go raw.go set.go with.go

Variables

All holds all builtins statements for easier registeration

var All = exec.StatementSet{}

type AutoescapeStmt

type AutoescapeStmt struct {
    Wrapper    *nodes.Wrapper
    Autoescape bool
}

func (*AutoescapeStmt) Execute

func (stmt *AutoescapeStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error

func (*AutoescapeStmt) Position

func (stmt *AutoescapeStmt) Position() *tokens.Token

func (*AutoescapeStmt) String

func (stmt *AutoescapeStmt) String() string

type BlockInfos

type BlockInfos struct {
    Block    *BlockStmt
    Renderer *exec.Renderer
    Blocks   []*nodes.Wrapper
    Root     *nodes.Template
}

type BlockStmt

type BlockStmt struct {
    Location *tokens.Token
    Name     string
}

func (*BlockStmt) Execute

func (stmt *BlockStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error

func (*BlockStmt) Position

func (stmt *BlockStmt) Position() *tokens.Token

func (*BlockStmt) String

func (stmt *BlockStmt) String() string

type ExtendsStmt

type ExtendsStmt struct {
    Location    *tokens.Token
    Filename    string
    WithContext bool
}

func (*ExtendsStmt) Execute

func (node *ExtendsStmt) Execute(r *exec.Renderer) error

func (*ExtendsStmt) Position

func (stmt *ExtendsStmt) Position() *tokens.Token

func (*ExtendsStmt) String

func (stmt *ExtendsStmt) String() string

type FilterStmt

type FilterStmt struct {
    // contains filtered or unexported fields
}

func (*FilterStmt) Execute

func (node *FilterStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error

func (*FilterStmt) Position

func (stmt *FilterStmt) Position() *tokens.Token

func (*FilterStmt) String

func (stmt *FilterStmt) String() string

type ForStmt

type ForStmt struct {
    // contains filtered or unexported fields
}

func (*ForStmt) Execute

func (node *ForStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) (forError error)

func (*ForStmt) Position

func (stmt *ForStmt) Position() *tokens.Token

func (*ForStmt) String

func (stmt *ForStmt) String() string

type FromImportStmt

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 (*FromImportStmt) Execute

func (stmt *FromImportStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error

func (*FromImportStmt) Position

func (stmt *FromImportStmt) Position() *tokens.Token

func (*FromImportStmt) String

func (stmt *FromImportStmt) String() string

type IfStmt

type IfStmt struct {
    Location *tokens.Token
    // contains filtered or unexported fields
}

func (*IfStmt) Execute

func (node *IfStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error

func (*IfStmt) Position

func (stmt *IfStmt) Position() *tokens.Token

func (*IfStmt) String

func (stmt *IfStmt) String() string

type ImportStmt

type ImportStmt struct {
    Location     *tokens.Token
    Filename     string
    FilenameExpr nodes.Expression
    As           string
    WithContext  bool
    Template     *nodes.Template
}

func (*ImportStmt) Execute

func (stmt *ImportStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error

func (*ImportStmt) Position

func (stmt *ImportStmt) Position() *tokens.Token

func (*ImportStmt) String

func (stmt *ImportStmt) String() string

type IncludeEmptyStmt

type IncludeEmptyStmt struct{}

type IncludeStmt

type IncludeStmt struct {
    // tpl               *Template
    Location      *tokens.Token
    Filename      string
    FilenameExpr  nodes.Expression
    Template      *nodes.Template
    IgnoreMissing bool
    WithContext   bool
    IsEmpty       bool
}

func (*IncludeStmt) Execute

func (stmt *IncludeStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error

func (*IncludeStmt) Position

func (stmt *IncludeStmt) Position() *tokens.Token

func (*IncludeStmt) String

func (stmt *IncludeStmt) String() string

type LoopInfos

type LoopInfos struct {
    PrevItem *exec.Value
    NextItem *exec.Value
    // contains filtered or unexported fields
}

func (*LoopInfos) Changed

func (li *LoopInfos) Changed(value *exec.Value) bool

func (*LoopInfos) Cycle

func (li *LoopInfos) Cycle(va *exec.VarArgs) *exec.Value

type MacroStmt

type MacroStmt struct {
    *nodes.Macro
}

func (*MacroStmt) Execute

func (stmt *MacroStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error

func (*MacroStmt) String

func (stmt *MacroStmt) String() string

func (stmt *MacroStmt) Position() *tokens.Token { return stmt.Location }

type RawStmt

type RawStmt struct {
    Data *nodes.Data
}

func (*RawStmt) Execute

func (stmt *RawStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error

func (*RawStmt) Position

func (stmt *RawStmt) Position() *tokens.Token

func (*RawStmt) String

func (stmt *RawStmt) String() string

type SetStmt

type SetStmt struct {
    Location   *tokens.Token
    Target     nodes.Expression
    Expression nodes.Expression
}

func (*SetStmt) Execute

func (stmt *SetStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error

func (*SetStmt) Position

func (stmt *SetStmt) Position() *tokens.Token

func (*SetStmt) String

func (stmt *SetStmt) String() string

type WithStmt

type WithStmt struct {
    Location *tokens.Token
    Pairs    map[string]nodes.Expression
    Wrapper  *nodes.Wrapper
}

func (*WithStmt) Execute

func (stmt *WithStmt) Execute(r *exec.Renderer, tag *nodes.StatementBlock) error

func (*WithStmt) Position

func (stmt *WithStmt) Position() *tokens.Token

func (*WithStmt) String

func (stmt *WithStmt) String() string