Versions in this module Expand all Collapse all v0 v0.56.1 Aug 4, 2022 v0.56.0 Aug 4, 2022 v0.55.0 Jul 8, 2022 v0.54.0 Jun 27, 2022 Changes in this version type Block + func (n *Block) String() string type ForIn + Else *Block type ForRange + Else *Block v0.53.5 Jan 7, 2022 Changes in this version + func StringWithParenthesis(expr Expression) string v0.53.4 Oct 27, 2021 v0.53.3 Oct 21, 2021 v0.53.2 Oct 20, 2021 v0.53.1 Oct 12, 2021 v0.53.0 Oct 4, 2021 v0.52.2 Sep 28, 2021 v0.52.1 Sep 23, 2021 v0.52.0 Sep 22, 2021 v0.51.1 Sep 17, 2021 v0.51.0 Sep 15, 2021 Changes in this version type Func + DistFree bool v0.50.0 Sep 9, 2021 v0.49.0 Sep 2, 2021 Changes in this version type Import + For []*Identifier v0.48.0 Aug 26, 2021 v0.47.0 Aug 24, 2021 Changes in this version + type ArrayType struct + ElementType Expression + Len Expression + func NewArrayType(pos *Position, len Expression, elementType Expression) *ArrayType + func (e ArrayType) Parenthesis() int + func (e ArrayType) SetParenthesis(n int) + func (n *ArrayType) String() string + type Assignment struct + Lhs []Expression + Rhs []Expression + Type AssignmentType + func NewAssignment(pos *Position, lhs []Expression, typ AssignmentType, rhs []Expression) *Assignment + func (n *Assignment) String() string + type AssignmentType int + const AssignmentAddition + const AssignmentAnd + const AssignmentAndNot + const AssignmentDeclaration + const AssignmentDecrement + const AssignmentDivision + const AssignmentIncrement + const AssignmentLeftShift + const AssignmentModulo + const AssignmentMultiplication + const AssignmentOr + const AssignmentRightShift + const AssignmentSimple + const AssignmentSubtraction + const AssignmentXor + type BasicLiteral struct + Type LiteralType + Value string + func NewBasicLiteral(pos *Position, typ LiteralType, value string) *BasicLiteral + func (e *BasicLiteral) Parenthesis() int + func (e *BasicLiteral) SetParenthesis(n int) + func (n *BasicLiteral) String() string + type BinaryOperator struct + Expr1 Expression + Expr2 Expression + Op OperatorType + func NewBinaryOperator(pos *Position, op OperatorType, expr1, expr2 Expression) *BinaryOperator + func (e BinaryOperator) Parenthesis() int + func (e BinaryOperator) SetParenthesis(n int) + func (n *BinaryOperator) Operator() OperatorType + func (n *BinaryOperator) Precedence() int + func (n *BinaryOperator) String() string + type Block struct + Nodes []Node + func NewBlock(pos *Position, nodes []Node) *Block + type Break struct + Label *Identifier + func NewBreak(pos *Position, label *Identifier) *Break + type Call struct + Args []Expression + Func Expression + IR struct{ ... } + IsVariadic bool + func NewCall(pos *Position, fun Expression, args []Expression, isVariadic bool) *Call + func (e Call) Parenthesis() int + func (e Call) SetParenthesis(n int) + func (n *Call) String() string + type Case struct + Body []Node + Expressions []Expression + func NewCase(pos *Position, expressions []Expression, body []Node) *Case + type ChanDirection int + const NoDirection + const ReceiveDirection + const SendDirection + func (dir ChanDirection) String() string + type ChanType struct + Direction ChanDirection + ElementType Expression + func NewChanType(pos *Position, direction ChanDirection, elementType Expression) *ChanType + func (e ChanType) Parenthesis() int + func (e ChanType) SetParenthesis(n int) + func (n *ChanType) String() string + type Comment struct + Text string + func NewComment(pos *Position, text string) *Comment + type CompositeLiteral struct + KeyValues []KeyValue + Type Expression + func NewCompositeLiteral(pos *Position, typ Expression, keyValues []KeyValue) *CompositeLiteral + func (e CompositeLiteral) Parenthesis() int + func (e CompositeLiteral) SetParenthesis(n int) + func (n *CompositeLiteral) String() string + type Const struct + Index int + Lhs []*Identifier + Rhs []Expression + Type Expression + func NewConst(pos *Position, lhs []*Identifier, typ Expression, rhs []Expression, index int) *Const + type Context int + const ContextCSS + const ContextCSSString + const ContextHTML + const ContextJS + const ContextJSON + const ContextJSONString + const ContextJSString + const ContextMarkdown + const ContextQuotedAttr + const ContextSpacesCodeBlock + const ContextTabCodeBlock + const ContextTag + const ContextText + const ContextUnquotedAttr + func (ctx Context) String() string + type Continue struct + Label *Identifier + func NewContinue(pos *Position, label *Identifier) *Continue + type Cut struct + Left int + Right int + type Default struct + Expr1 Expression + Expr2 Expression + func NewDefault(pos *Position, expr1, expr2 Expression) *Default + func (e *Default) Parenthesis() int + func (e *Default) SetParenthesis(n int) + func (n *Default) String() string + type Defer struct + Call Expression + func NewDefer(pos *Position, call Expression) *Defer + func (n *Defer) String() string + type DollarIdentifier struct + IR struct{ ... } + Ident *Identifier + func NewDollarIdentifier(pos *Position, ident *Identifier) *DollarIdentifier + func (e DollarIdentifier) Parenthesis() int + func (e DollarIdentifier) SetParenthesis(n int) + func (n *DollarIdentifier) String() string + type Expression interface + Parenthesis func() int + SetParenthesis func(int) + String func() string + type Extends struct + Format Format + Path string + Tree *Tree + func NewExtends(pos *Position, path string, format Format) *Extends + func (n *Extends) String() string + type Fallthrough struct + func NewFallthrough(pos *Position) *Fallthrough + type Field struct + Idents []*Identifier + Tag string + Type Expression + func NewField(idents []*Identifier, typ Expression, tag string) *Field + func (n *Field) String() string + type For struct + Body []Node + Condition Expression + Init Node + Post Node + func NewFor(pos *Position, init Node, condition Expression, post Node, body []Node) *For + type ForIn struct + Body []Node + Expr Expression + Ident *Identifier + func NewForIn(pos *Position, ident *Identifier, expr Expression, body []Node) *ForIn + type ForRange struct + Assignment *Assignment + Body []Node + func NewForRange(pos *Position, assignment *Assignment, body []Node) *ForRange + type Format int + const FormatCSS + const FormatHTML + const FormatJS + const FormatJSON + const FormatMarkdown + const FormatText + func (format Format) String() string + type Func struct + Body *Block + Endless bool + Format Format + Ident *Identifier + Type *FuncType + Upvars []Upvar + func NewFunc(pos *Position, name *Identifier, typ *FuncType, body *Block, endless bool, ...) *Func + func (e *Func) Parenthesis() int + func (e *Func) SetParenthesis(n int) + func (n *Func) String() string + type FuncType struct + IsVariadic bool + Macro bool + Parameters []*Parameter + Reflect reflect.Type + Result []*Parameter + func NewFuncType(pos *Position, macro bool, parameters []*Parameter, result []*Parameter, ...) *FuncType + func (e *FuncType) Parenthesis() int + func (e *FuncType) SetParenthesis(n int) + func (n *FuncType) String() string + type Go struct + Call Expression + func NewGo(pos *Position, call Expression) *Go + func (n *Go) String() string + type Goto struct + Label *Identifier + func NewGoto(pos *Position, label *Identifier) *Goto + func (n *Goto) String() string + type Identifier struct + Name string + func NewIdentifier(pos *Position, name string) *Identifier + func (e *Identifier) Parenthesis() int + func (e *Identifier) SetParenthesis(n int) + func (n *Identifier) String() string + type If struct + Condition Expression + Else Node + Init Node + Then *Block + func NewIf(pos *Position, init Node, cond Expression, then *Block, els Node) *If + type Import struct + Ident *Identifier + Path string + Tree *Tree + func NewImport(pos *Position, ident *Identifier, path string) *Import + func (n *Import) String() string + type Index struct + Expr Expression + Index Expression + func NewIndex(pos *Position, expr Expression, index Expression) *Index + func (e Index) Parenthesis() int + func (e Index) SetParenthesis(n int) + func (n *Index) String() string + type Interface struct + func NewInterface(pos *Position) *Interface + func (e Interface) Parenthesis() int + func (e Interface) SetParenthesis(n int) + func (n *Interface) String() string + type KeyValue struct + Key Expression + Value Expression + func (kv KeyValue) String() string + type Label struct + Ident *Identifier + Statement Node + func NewLabel(pos *Position, ident *Identifier, statement Node) *Label + type LiteralType int + const FloatLiteral + const ImaginaryLiteral + const IntLiteral + const RuneLiteral + const StringLiteral + type MapType struct + KeyType Expression + ValueType Expression + func NewMapType(pos *Position, keyType, valueType Expression) *MapType + func (e MapType) Parenthesis() int + func (e MapType) SetParenthesis(n int) + func (n *MapType) String() string + type Node interface + Pos func() *Position + type Operator interface + Operator func() OperatorType + Precedence func() int + type OperatorType int + const OperatorAddition + const OperatorAddress + const OperatorAnd + const OperatorAndNot + const OperatorBitAnd + const OperatorBitOr + const OperatorContains + const OperatorDivision + const OperatorEqual + const OperatorExtendedAnd + const OperatorExtendedNot + const OperatorExtendedOr + const OperatorGreater + const OperatorGreaterEqual + const OperatorLeftShift + const OperatorLess + const OperatorLessEqual + const OperatorModulo + const OperatorMultiplication + const OperatorNot + const OperatorNotContains + const OperatorNotEqual + const OperatorOr + const OperatorPointer + const OperatorReceive + const OperatorRightShift + const OperatorSubtraction + const OperatorXor + func (op OperatorType) String() string + type Package struct + Declarations []Node + IR struct{ ... } + Name string + func NewPackage(pos *Position, name string, nodes []Node) *Package + type Parameter struct + Ident *Identifier + Type Expression + func NewParameter(ident *Identifier, typ Expression) *Parameter + func (n *Parameter) String() string + type Placeholder struct + func NewPlaceholder() *Placeholder + func (e Placeholder) Parenthesis() int + func (e Placeholder) SetParenthesis(n int) + func (n *Placeholder) String() string + type Position struct + Column int + End int + Line int + Start int + func (p *Position) Pos() *Position + func (p *Position) WithEnd(end int) *Position + func (p Position) String() string + type Raw struct + Marker string + Tag string + Text *Text + func NewRaw(pos *Position, marker, tag string, text *Text) *Raw + type Render struct + IR struct{ ... } + Path string + Tree *Tree + func NewRender(pos *Position, path string) *Render + func (e *Render) Parenthesis() int + func (e *Render) SetParenthesis(n int) + func (n *Render) String() string + type Return struct + Values []Expression + func NewReturn(pos *Position, values []Expression) *Return + type Select struct + Cases []*SelectCase + LeadingText *Text + func NewSelect(pos *Position, leadingText *Text, cases []*SelectCase) *Select + type SelectCase struct + Body []Node + Comm Node + func NewSelectCase(pos *Position, comm Node, body []Node) *SelectCase + type Selector struct + Expr Expression + Ident string + func NewSelector(pos *Position, expr Expression, ident string) *Selector + func (e Selector) Parenthesis() int + func (e Selector) SetParenthesis(n int) + func (n *Selector) String() string + type Send struct + Channel Expression + Value Expression + func NewSend(pos *Position, channel Expression, value Expression) *Send + func (n *Send) String() string + type Show struct + Context Context + Expressions []Expression + func NewShow(pos *Position, expressions []Expression, ctx Context) *Show + func (n *Show) String() string + type SliceType struct + ElementType Expression + func NewSliceType(pos *Position, elementType Expression) *SliceType + func (e SliceType) Parenthesis() int + func (e SliceType) SetParenthesis(n int) + func (n *SliceType) String() string + type Slicing struct + Expr Expression + High Expression + IsFull bool + Low Expression + Max Expression + func NewSlicing(pos *Position, expr, low, high Expression, max Expression, isFull bool) *Slicing + func (e Slicing) Parenthesis() int + func (e Slicing) SetParenthesis(n int) + func (n *Slicing) String() string + type Statements struct + Nodes []Node + func NewStatements(pos *Position, nodes []Node) *Statements + type StructType struct + Fields []*Field + func NewStructType(pos *Position, fields []*Field) *StructType + func (e StructType) Parenthesis() int + func (e StructType) SetParenthesis(n int) + func (n *StructType) String() string + type Switch struct + Cases []*Case + Expr Expression + Init Node + LeadingText *Text + func NewSwitch(pos *Position, init Node, expr Expression, leadingText *Text, cases []*Case) *Switch + type Text struct + Cut Cut + Text []byte + func NewText(pos *Position, text []byte, cut Cut) *Text + func (n *Text) String() string + type Tree struct + Format Format + Nodes []Node + Path string + func NewTree(path string, nodes []Node, format Format) *Tree + type TypeAssertion struct + Expr Expression + Type Expression + func NewTypeAssertion(pos *Position, expr Expression, typ Expression) *TypeAssertion + func (e TypeAssertion) Parenthesis() int + func (e TypeAssertion) SetParenthesis(n int) + func (n *TypeAssertion) String() string + type TypeDeclaration struct + Ident *Identifier + IsAliasDeclaration bool + Type Expression + func NewTypeDeclaration(pos *Position, ident *Identifier, typ Expression, isAliasDeclaration bool) *TypeDeclaration + func (n *TypeDeclaration) String() string + type TypeSwitch struct + Assignment *Assignment + Cases []*Case + Init Node + LeadingText *Text + func NewTypeSwitch(pos *Position, init Node, assignment *Assignment, leadingText *Text, ...) *TypeSwitch + type URL struct + Attribute string + Tag string + Value []Node + func NewURL(pos *Position, tag, attribute string, value []Node) *URL + type UnaryOperator struct + Expr Expression + Op OperatorType + func NewUnaryOperator(pos *Position, op OperatorType, expr Expression) *UnaryOperator + func (e UnaryOperator) Parenthesis() int + func (e UnaryOperator) SetParenthesis(n int) + func (n *UnaryOperator) Operator() OperatorType + func (n *UnaryOperator) Precedence() int + func (n *UnaryOperator) String() string + type Upvar struct + Declaration Node + NativeName string + NativePkg string + NativeValue *reflect.Value + NativeValueType reflect.Type + type Using struct + Body *Block + Format Format + Statement Node + Type Expression + func NewUsing(pos *Position, stmt Node, typ Expression, body *Block, format Format) *Using + type Var struct + Lhs []*Identifier + Rhs []Expression + Type Expression + func NewVar(pos *Position, lhs []*Identifier, typ Expression, rhs []Expression) *Var + func (n *Var) String() string