Documentation ¶
Index ¶
- type Assign
- type AssignBlock
- type BinExpr
- type Block
- type Call
- type CallBlock
- type Compare
- type Concat
- type CondExpr
- type Const
- type Dict
- type EvalContextModifier
- type Expr
- type ExprCommon
- type ExprWithName
- type Extends
- type Filter
- type FilterBlock
- type FilterTestCommon
- type For
- type FromImport
- type Getattr
- type Getitem
- type Helper
- type HelperCommon
- type If
- type Import
- type Include
- type Keyword
- type List
- type Literal
- type LiteralCommon
- type Macro
- type MacroCall
- type NSRef
- type Name
- type Node
- type NodeCommon
- type Operand
- type Output
- type Pair
- type Scope
- type ScopedEvalContextModifier
- type SetWithContexter
- type Slice
- type Stmt
- type StmtCommon
- type StmtWithNodes
- type Template
- type TemplateData
- type Test
- type Tuple
- type UnaryExpr
- type With
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assign ¶
type Assign struct { Target Expr Node Node StmtCommon }
type AssignBlock ¶
type AssignBlock struct { Target Expr Body []Node Filter *Filter StmtCommon }
func (*AssignBlock) SetCtx ¶
func (a *AssignBlock) SetCtx(ctx string)
type BinExpr ¶
type BinExpr struct { Left Expr Right Expr Op string // same as lexer.TokenAdd etc. + "and", "or" ExprCommon }
type Call ¶
type Compare ¶
type Compare struct { Expr Expr Ops []Operand ExprCommon }
type Concat ¶
type Concat struct { Nodes []Expr ExprCommon }
type Const ¶
type Const struct { Value any LiteralCommon }
type Dict ¶
type Dict struct { Items []Pair LiteralCommon }
type EvalContextModifier ¶
type EvalContextModifier struct { Options []Keyword StmtCommon }
func (*EvalContextModifier) SetCtx ¶
func (e *EvalContextModifier) SetCtx(ctx string)
type ExprCommon ¶
type ExprCommon NodeCommon
func (ExprCommon) CanAssign ¶
func (ExprCommon) CanAssign() bool
func (*ExprCommon) GetLineno ¶
func (e *ExprCommon) GetLineno() int
type ExprWithName ¶
type Extends ¶
type Extends struct { Template Expr StmtCommon }
type Filter ¶
type Filter struct {
FilterTestCommon
}
type FilterBlock ¶
type FilterBlock struct { Body []Node Filter *Filter StmtCommon }
func (*FilterBlock) SetCtx ¶
func (f *FilterBlock) SetCtx(ctx string)
type FilterTestCommon ¶
type FilterTestCommon struct { Node *Expr Name string Args []Expr Kwargs []Keyword // Jinja uses Pair but then other methods returns Keyword instead of Pair -_- DynArgs *Expr DynKwargs *Expr ExprCommon }
func (*FilterTestCommon) SetCtx ¶
func (f *FilterTestCommon) SetCtx(ctx string)
type For ¶
type FromImport ¶
type FromImport struct { Template Expr WithContext bool Names [][]string // name or name with alias StmtCommon }
func (*FromImport) SetCtx ¶
func (f *FromImport) SetCtx(ctx string)
func (*FromImport) SetWithContext ¶
func (f *FromImport) SetWithContext(b bool)
type HelperCommon ¶
type HelperCommon NodeCommon
func (HelperCommon) GetLineno ¶
func (h HelperCommon) GetLineno() int
type Import ¶
type Import struct { Template Expr WithContext bool Target string StmtCommon }
func (*Import) SetWithContext ¶
type Include ¶
type Include struct { Template Expr WithContext bool IgnoreMissing bool StmtCommon }
func (*Include) SetWithContext ¶
type Keyword ¶
type Keyword struct { Key string Value Expr HelperCommon }
type List ¶
type List struct { Items []Expr LiteralCommon }
type LiteralCommon ¶
type LiteralCommon ExprCommon
func (LiteralCommon) CanAssign ¶
func (LiteralCommon) CanAssign() bool
func (LiteralCommon) GetLineno ¶
func (l LiteralCommon) GetLineno() int
type NSRef ¶
type NSRef struct { Name string Attr string ExprCommon }
type Name ¶
type Name struct { Name string Ctx string ExprCommon }
type NodeCommon ¶
type NodeCommon struct {
Lineno int
}
func (*NodeCommon) GetLineno ¶
func (n *NodeCommon) GetLineno() int
type Operand ¶
type Operand struct { Op string Expr Node HelperCommon }
type Output ¶
type Output struct { Nodes []Expr StmtCommon }
type Pair ¶
type Pair struct { Key Expr Value Expr HelperCommon }
type Scope ¶
type Scope struct { Body []Node StmtCommon }
type ScopedEvalContextModifier ¶
type ScopedEvalContextModifier struct { Body []Node EvalContextModifier }
func (*ScopedEvalContextModifier) SetCtx ¶
func (s *ScopedEvalContextModifier) SetCtx(ctx string)
type SetWithContexter ¶
type StmtCommon ¶
type StmtCommon NodeCommon
func (*StmtCommon) GetLineno ¶
func (s *StmtCommon) GetLineno() int
type StmtWithNodes ¶
type Template ¶
type Template struct { Body []Node NodeCommon }
type TemplateData ¶
type TemplateData struct { Data string LiteralCommon }
TemplateData represents a constant template string.
func (*TemplateData) SetCtx ¶
func (t *TemplateData) SetCtx(string)
type Test ¶
type Test struct {
FilterTestCommon
}
type Tuple ¶
type Tuple struct { Items []Expr Ctx string LiteralCommon }
type UnaryExpr ¶
type UnaryExpr struct { Node Expr Op string // same as lexer.TokenAdd etc. + "not" ExprCommon }
Click to show internal directories.
Click to hide internal directories.