statements

package
v0.0.0-...-4d051fd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2020 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

All holds all builtins statements for easier registeration

Functions

This section is empty.

Types

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL