Versions in this module Expand all Collapse all v0 v0.5.1 Jan 16, 2020 Changes in this version + func Format(node fmt.Formatter) []byte + type ArrayType struct + Elt Expr + Lbrack Token + Len Expr + func ArrayEllipsis(elt Expr) *ArrayType + func ArrayN(n int, elt Expr) *ArrayType + func SliceType(elt Expr) *ArrayType + func (*ArrayType) GoIsExpr() + func (n *ArrayType) Format(s fmt.State, c rune) + type AssignStmt struct + LHS []Expr + RHS []Expr + Tok Token + func Assign(lhs []Expr, rhs ...Expr) *AssignStmt + func Init(idents []string, rhs ...Expr) *AssignStmt + func (*AssignStmt) GoIsStmt() + func (n *AssignStmt) Format(s fmt.State, c rune) + type BadDecl struct + Token Token + func (*BadDecl) GoIsDecl() + func (n *BadDecl) Format(s fmt.State, c rune) + type BadExpr struct + Token Token + func (*BadExpr) GoIsExpr() + func (n *BadExpr) Format(s fmt.State, c rune) + type BadStmt struct + Token Token + func (*BadStmt) GoIsStmt() + func (n *BadStmt) Format(s fmt.State, c rune) + type BasicLit struct + Token Token + func Float(v float64) *BasicLit + func Int(v int) *BasicLit + func String(v string) *BasicLit + func (*BasicLit) GoIsExpr() + func (n *BasicLit) Format(s fmt.State, c rune) + type BinaryExpr struct + Op Token + X Expr + Y Expr + func Binary(x Expr, op string, y Expr) *BinaryExpr + func (*BinaryExpr) GoIsExpr() + func (n *BinaryExpr) Format(s fmt.State, c rune) + type BlockStmt struct + Lbrace Token + List []Stmt + Rbrace Token + func Block(stmt ...Stmt) *BlockStmt + func (*BlockStmt) GoIsStmt() + func (n *BlockStmt) Format(s fmt.State, c rune) + type BranchStmt struct + Label *Ident + Tok Token + func Break() *BranchStmt + func BreakTo(label string) *BranchStmt + func Continue() *BranchStmt + func ContinueTo(label string) *BranchStmt + func Fallthrough() *BranchStmt + func Goto(label string) *BranchStmt + func (*BranchStmt) GoIsStmt() + func (n *BranchStmt) Format(s fmt.State, c rune) + type CallExpr struct + Args []Expr + Ellipsis Token + Fun Expr + Lparen Token + Rparen Token + func Call(fun Expr, args ...Expr) *CallExpr + func CallVararg(fun Expr, args ...Expr) *CallExpr + func (*CallExpr) GoIsExpr() + func (n *CallExpr) Format(s fmt.State, c rune) + type CaseClause struct + Body []Stmt + Case Token + Colon Token + List []Expr + func Case(list []Expr, stmts ...Stmt) *CaseClause + func DefaultCase(stmts ...Stmt) *CaseClause + func (*CaseClause) GoIsStmt() + func (n *CaseClause) Format(s fmt.State, c rune) + type ChanType struct + Arrow Token + Begin Token + Dir string + Value Expr + func (*ChanType) GoIsExpr() + func (n *ChanType) Format(s fmt.State, c rune) + type CommClause struct + Body []Stmt + Case Token + Colon Token + Comm Stmt + func DefaultComm(stmts ...Stmt) *CommClause + func RecvAssignComm(lhs []Expr, ch Expr, stmts ...Stmt) *CommClause + func RecvInitComm(lhs []string, ch Expr, stmts ...Stmt) *CommClause + func SendComm(ch, value Expr, stmts ...Stmt) *CommClause + func (*CommClause) GoIsStmt() + func (n *CommClause) Format(s fmt.State, c rune) + type Comment struct + Token Token + func (n *Comment) Format(s fmt.State, c rune) + type CommentGroup struct + List []Comment + func (n *CommentGroup) Format(s fmt.State, c rune) + type CompositeLit struct + Elts []Expr + Incomplete bool + Lbrace Token + Rbrace Token + Type Expr + func Composite(t Expr, elts ...Expr) *CompositeLit + func (*CompositeLit) GoIsExpr() + func (n *CompositeLit) Format(s fmt.State, c rune) + type Decl interface + GoIsDecl func() + type DeclStmt struct + Decl Decl + func (*DeclStmt) GoIsStmt() + func (n *DeclStmt) Format(s fmt.State, c rune) + type DeferStmt struct + Call CallExpr + Defer Token + func Defer(fun Expr, args ...Expr) *DeferStmt + func DeferVararg(fun Expr, args ...Expr) *DeferStmt + func (*DeferStmt) GoIsStmt() + func (n *DeferStmt) Format(s fmt.State, c rune) + type Ellipsis struct + Ellipsis Token + Elt Expr + func (*Ellipsis) GoIsExpr() + func (n *Ellipsis) Format(s fmt.State, c rune) + type EmptyStmt struct + Implicit bool + Semicolon Token + func (*EmptyStmt) GoIsStmt() + func (n *EmptyStmt) Format(s fmt.State, c rune) + type Expr interface + GoIsExpr func() + type ExprStmt struct + X Expr + func (*ExprStmt) GoIsStmt() + func (n *ExprStmt) Format(s fmt.State, c rune) + type Field struct + Comment *CommentGroup + Doc *CommentGroup + Names []Ident + Tag *BasicLit + Type Expr + func (n *Field) Format(s fmt.State, c rune) + type FieldList struct + Closing Token + List []Field + Opening Token + func ParenFields(fields ...Field) *FieldList + func (n *FieldList) Format(s fmt.State, c rune) + type File struct + Comments []CommentGroup + Decls []Decl + Doc *CommentGroup + Imports []ImportSpec + Name Ident + Package Token + Unresolved []Ident + func (n *File) Format(s fmt.State, c rune) + type ForStmt struct + Body BlockStmt + Cond Expr + For Token + Init Stmt + Post Stmt + func (*ForStmt) GoIsStmt() + func (n *ForStmt) Format(s fmt.State, c rune) + type FuncDecl struct + Body *BlockStmt + Doc *CommentGroup + Name Ident + Recv *FieldList + Type FuncType + func (*FuncDecl) GoIsDecl() + func (n *FuncDecl) Format(s fmt.State, c rune) + type FuncLit struct + Body BlockStmt + Type FuncType + func Func(params FieldList, results *FieldList, stmts ...Stmt) *FuncLit + func (*FuncLit) GoIsExpr() + func (n *FuncLit) Format(s fmt.State, c rune) + type FuncType struct + Func Token + Params FieldList + Results *FieldList + func (*FuncType) GoIsExpr() + func (n *FuncType) Format(s fmt.State, c rune) + type GenDecl struct + Doc *CommentGroup + Lparen Token + Rparen Token + Specs []Spec + Tok Token + func Const(values ...ValueSpec) *GenDecl + func Import(imports ...ImportSpec) *GenDecl + func Types(types ...TypeSpec) *GenDecl + func Var(values ...ValueSpec) *GenDecl + func (*GenDecl) GoIsDecl() + func (n *GenDecl) Format(s fmt.State, c rune) + type GoStmt struct + Call CallExpr + Go Token + func (*GoStmt) GoIsStmt() + func (n *GoStmt) Format(s fmt.State, c rune) + type Ident struct + Name Token + func I(id string) *Ident + func Idents(ids ...string) []Ident + func Nil() *Ident + func (*Ident) GoIsExpr() + func (n *Ident) Format(s fmt.State, c rune) + type IfStmt struct + Body BlockStmt + Cond Expr + Else Stmt + If Token + Init Stmt + func If(init Stmt, cond Expr, stmts ...Stmt) *IfStmt + func (*IfStmt) GoIsStmt() + func (n *IfStmt) CopyChain() (head, last *IfStmt) + func (n *IfStmt) Format(s fmt.State, c rune) + func (n *IfStmt) WithElse(stmts ...Stmt) *IfStmt + func (n *IfStmt) WithElseIf(init Stmt, cond Expr, stmts ...Stmt) *IfStmt + type ImportSpec struct + Comment *CommentGroup + Doc *CommentGroup + EndPos Token + Name *Ident + Path BasicLit + func (*ImportSpec) GoIsSpec() + func (n *ImportSpec) Format(s fmt.State, c rune) + type IncDecStmt struct + Tok Token + X Expr + func Dec(x Expr) *IncDecStmt + func Inc(x Expr) *IncDecStmt + func (*IncDecStmt) GoIsStmt() + func (n *IncDecStmt) Format(s fmt.State, c rune) + type IndexExpr struct + Index Expr + Lbrack Token + Rbrack Token + X Expr + func Index(a, b Expr) *IndexExpr + func (*IndexExpr) GoIsExpr() + func (n *IndexExpr) Format(s fmt.State, c rune) + type InterfaceType struct + Incomplete bool + Interface Token + Methods FieldList + func (*InterfaceType) GoIsExpr() + func (n *InterfaceType) Format(s fmt.State, c rune) + type KeyValueExpr struct + Colon Token + Key Expr + Value Expr + func KV(key, value Expr) *KeyValueExpr + func (*KeyValueExpr) GoIsExpr() + func (n *KeyValueExpr) Format(s fmt.State, c rune) + type LabeledStmt struct + Colon Token + Label Ident + Stmt Stmt + func (*LabeledStmt) GoIsStmt() + func (n *LabeledStmt) Format(s fmt.State, c rune) + type MapType struct + Key Expr + Map Token + Value Expr + func Map(key, value Expr) *MapType + func (*MapType) GoIsExpr() + func (n *MapType) Format(s fmt.State, c rune) + type NoCommaSepFieldList FieldList + func (n *NoCommaSepFieldList) Format(s fmt.State, c rune) + type ParenExpr struct + Lparen Token + Rparen Token + X Expr + func (*ParenExpr) GoIsExpr() + func (n *ParenExpr) Format(s fmt.State, c rune) + type RangeStmt struct + Body BlockStmt + For Token + Key Expr + Tok Token + Value Expr + X Expr + func Range(key, value Expr, tok string, x Expr, body ...Stmt) *RangeStmt + func (*RangeStmt) GoIsStmt() + func (n *RangeStmt) Format(s fmt.State, c rune) + type ReturnStmt struct + Results []Expr + Return Token + func Return(results ...Expr) *ReturnStmt + func (*ReturnStmt) GoIsStmt() + func (n *ReturnStmt) Format(s fmt.State, c rune) + type SelectStmt struct + Body BlockStmt + Select Token + func Select(body ...Stmt) *SelectStmt + func (*SelectStmt) GoIsStmt() + func (n *SelectStmt) Format(s fmt.State, c rune) + type SelectorExpr struct + Sel Ident + X Expr + func Dot(x Expr, id string) *SelectorExpr + func (*SelectorExpr) GoIsExpr() + func (n *SelectorExpr) Format(s fmt.State, c rune) + type SendStmt struct + Arrow Token + Chan Expr + Value Expr + func Send(ch, value Expr) *SendStmt + func (*SendStmt) GoIsStmt() + func (n *SendStmt) Format(s fmt.State, c rune) + type SliceExpr struct + High Expr + Lbrack Token + Low Expr + Max Expr + Rbrack Token + Slice3 bool + X Expr + func Slice(x Expr, args ...Expr) *SliceExpr + func (*SliceExpr) GoIsExpr() + func (n *SliceExpr) Format(s fmt.State, c rune) + type Spec interface + GoIsSpec func() + type StarExpr struct + Star Token + X Expr + func Star(x Expr) *StarExpr + func (*StarExpr) GoIsExpr() + func (n *StarExpr) Format(s fmt.State, c rune) + type Stmt interface + GoIsStmt func() + type StructType struct + Fields FieldList + Incomplete bool + Struct Token + func Struct(fields ...Field) *StructType + func (*StructType) GoIsExpr() + func (n *StructType) Format(s fmt.State, c rune) + type SwitchStmt struct + Body BlockStmt + Init Stmt + Switch Token + Tag Expr + func Switch(init Expr, body ...Stmt) *SwitchStmt + func (*SwitchStmt) GoIsStmt() + func (n *SwitchStmt) Format(s fmt.State, c rune) + type Token struct + Kind string + Text string + func T(text string) *Token + func (n *Token) Format(s fmt.State, c rune) + type TypeAssertExpr struct + Lparen Token + Rparen Token + Type Expr + X Expr + func Assert(x, t Expr) *TypeAssertExpr + func AssertType(x Expr) *TypeAssertExpr + func (*TypeAssertExpr) GoIsExpr() + func (n *TypeAssertExpr) Format(s fmt.State, c rune) + type TypeSpec struct + Assign Token + Comment *CommentGroup + Doc *CommentGroup + Name Ident + Type Expr + func (*TypeSpec) GoIsSpec() + func (n *TypeSpec) Format(s fmt.State, c rune) + type TypeSwitchStmt struct + Assign Stmt + Body BlockStmt + Init Stmt + Switch Token + func TypeSwitch(init Stmt, x string, y Expr, body ...Stmt) *TypeSwitchStmt + func (*TypeSwitchStmt) GoIsStmt() + func (n *TypeSwitchStmt) Format(s fmt.State, c rune) + type UnaryExpr struct + Op Token + X Expr + func Recv(ch Expr) *UnaryExpr + func Unary(op string, x Expr) *UnaryExpr + func (*UnaryExpr) GoIsExpr() + func (n *UnaryExpr) Format(s fmt.State, c rune) + type ValueSpec struct + Comment *CommentGroup + Doc *CommentGroup + Names []Ident + Type Expr + Values []Expr + func (*ValueSpec) GoIsSpec() + func (n *ValueSpec) Format(s fmt.State, c rune)