ast2

package
v0.0.0-...-f54e8e0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MPL-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockStmtToExpr

func BlockStmtToExpr(node *ast.BlockStmt) ast.Expr

func ToBasicLit

func ToBasicLit(x Ast) *ast.BasicLit

func ToBlockStmt

func ToBlockStmt(x Ast) *ast.BlockStmt

func ToCallExpr

func ToCallExpr(x Ast) *ast.CallExpr

func ToDecl

func ToDecl(x Ast) ast.Decl

func ToExpr

func ToExpr(x Ast) ast.Expr

func ToExprSlice

func ToExprSlice(x Ast) []ast.Expr

func ToField

func ToField(x Ast) *ast.Field

func ToFieldList

func ToFieldList(x Ast) *ast.FieldList

func ToFile

func ToFile(x Ast) *ast.File

func ToFuncType

func ToFuncType(x Ast) *ast.FuncType

func ToIdent

func ToIdent(x Ast) *ast.Ident

func ToIdentSlice

func ToIdentSlice(x Ast) []*ast.Ident

func ToImportSpec

func ToImportSpec(x Ast) *ast.ImportSpec

func ToNode

func ToNode(x Ast) ast.Node

ToNode converts Ast back ast.Node, or panics on failure (it fails if the argument is not AstWithNode)

func ToNodes

func ToNodes(x Ast) []ast.Node

ToNode recursively traverses Ast and extracts all the contained ast.Node:s

func ToNodesAppend

func ToNodesAppend(dst []ast.Node, x Ast) []ast.Node

func ToSpec

func ToSpec(x Ast) ast.Spec

func ToStmt

func ToStmt(x Ast) ast.Stmt

func ToStmtSlice

func ToStmtSlice(x Ast) []ast.Stmt

Types

type ArrayType

type ArrayType struct{ X *ast.ArrayType }

func (ArrayType) Get

func (x ArrayType) Get(i int) Ast

.................. functions Get(int) Ast

func (ArrayType) Interface

func (x ArrayType) Interface() interface{}

.................. functions Interface() interface{}

func (ArrayType) New

func (x ArrayType) New() Ast

.................. functions New() Ast

func (ArrayType) Node

func (x ArrayType) Node() ast.Node

.................. functions Node() ast.Node

func (ArrayType) Op

func (x ArrayType) Op() token.Token

.................. functions Op() token.Token

func (ArrayType) Set

func (x ArrayType) Set(i int, child Ast)

.................. functions Set(int, Ast)

func (ArrayType) Size

func (x ArrayType) Size() int

.................. functions Size() int

type AssignStmt

type AssignStmt struct{ X *ast.AssignStmt }

func (AssignStmt) Get

func (x AssignStmt) Get(i int) Ast

func (AssignStmt) Interface

func (x AssignStmt) Interface() interface{}

func (AssignStmt) New

func (x AssignStmt) New() Ast

func (AssignStmt) Node

func (x AssignStmt) Node() ast.Node

func (AssignStmt) Op

func (x AssignStmt) Op() token.Token

func (AssignStmt) Set

func (x AssignStmt) Set(i int, child Ast)

func (AssignStmt) Size

func (x AssignStmt) Size() int

type Ast

type Ast interface {
	Interface() interface{}
	Op() token.Token
	Size() int
	Get(i int) Ast
	Set(i int, child Ast)
	New() Ast // returns a copy of Ast. the children are not copied
}

func AnyToAst

func AnyToAst(any interface{}, caller interface{}) Ast

type AstSlice

type AstSlice struct{ X []Ast }

func (AstSlice) Append

func (x AstSlice) Append(child Ast) AstWithSlice

func (AstSlice) Get

func (x AstSlice) Get(i int) Ast

func (AstSlice) Interface

func (x AstSlice) Interface() interface{}

func (AstSlice) New

func (x AstSlice) New() Ast

func (AstSlice) Op

func (x AstSlice) Op() token.Token

func (AstSlice) Set

func (x AstSlice) Set(i int, child Ast)

func (AstSlice) Size

func (x AstSlice) Size() int

func (AstSlice) Slice

func (x AstSlice) Slice(lo, hi int) AstWithSlice

type AstWithNode

type AstWithNode interface {
	Ast
	Node() ast.Node
}

func AnyToAstWithNode

func AnyToAstWithNode(any interface{}, caller interface{}) AstWithNode

func ToAst

func ToAst(node ast.Node) AstWithNode

ToAst converts an ast.Node to Ast, providing uniform access to the node contents

func ToAst1

func ToAst1(i int, node ast.Node) AstWithNode

ToAst2 returns either n0 (if i == 0) or n1, converted to Ast

func ToAst2

func ToAst2(i int, n0 ast.Node, n1 ast.Node) AstWithNode

ToAst2 returns either n0 (if i == 0) or n1, converted to Ast

func ToAst3

func ToAst3(i int, n0 ast.Node, n1 ast.Node, n2 *ast.BlockStmt) AstWithNode

func ToAst4

func ToAst4(i int, n0 ast.Node, n1 ast.Node, n2 ast.Node, n3 ast.Node) AstWithNode

type AstWithNode_github_com_cosmos72_gomacro_ast2

type AstWithNode_github_com_cosmos72_gomacro_ast2 struct {
	Object     interface{}
	Get_       func(i int) Ast
	Interface_ func() interface{}
	New_       func() Ast
	Node_      func() ast.Node
	Op_        func() token.Token
	Set_       func(i int, child Ast)
	Size_      func() int
}

--------------- proxy for github.com/cosmos72/gomacro/ast2.AstWithNode ---------------

func (*AstWithNode_github_com_cosmos72_gomacro_ast2) Get

func (*AstWithNode_github_com_cosmos72_gomacro_ast2) Interface

func (Proxy *AstWithNode_github_com_cosmos72_gomacro_ast2) Interface() interface{}

func (*AstWithNode_github_com_cosmos72_gomacro_ast2) New

func (*AstWithNode_github_com_cosmos72_gomacro_ast2) Node

func (*AstWithNode_github_com_cosmos72_gomacro_ast2) Op

func (*AstWithNode_github_com_cosmos72_gomacro_ast2) Set

func (*AstWithNode_github_com_cosmos72_gomacro_ast2) Size

type AstWithSlice

type AstWithSlice interface {
	Ast
	Slice(lo, hi int) AstWithSlice
	Append(child Ast) AstWithSlice
}

func AnyToAstWithSlice

func AnyToAstWithSlice(any interface{}, caller interface{}) AstWithSlice

func ToAstWithSlice

func ToAstWithSlice(x Ast, caller interface{}) AstWithSlice

type AstWithSlice_github_com_cosmos72_gomacro_ast2

type AstWithSlice_github_com_cosmos72_gomacro_ast2 struct {
	Object     interface{}
	Append_    func(child Ast) AstWithSlice
	Get_       func(i int) Ast
	Interface_ func() interface{}
	New_       func() Ast
	Op_        func() token.Token
	Set_       func(i int, child Ast)
	Size_      func() int
	Slice_     func(lo int, hi int) AstWithSlice
}

--------------- proxy for github.com/cosmos72/gomacro/ast2.AstWithSlice ---------------

func (*AstWithSlice_github_com_cosmos72_gomacro_ast2) Append

func (*AstWithSlice_github_com_cosmos72_gomacro_ast2) Get

func (*AstWithSlice_github_com_cosmos72_gomacro_ast2) Interface

func (Proxy *AstWithSlice_github_com_cosmos72_gomacro_ast2) Interface() interface{}

func (*AstWithSlice_github_com_cosmos72_gomacro_ast2) New

func (*AstWithSlice_github_com_cosmos72_gomacro_ast2) Op

func (*AstWithSlice_github_com_cosmos72_gomacro_ast2) Set

func (*AstWithSlice_github_com_cosmos72_gomacro_ast2) Size

func (*AstWithSlice_github_com_cosmos72_gomacro_ast2) Slice

type Ast_github_com_cosmos72_gomacro_ast2

type Ast_github_com_cosmos72_gomacro_ast2 struct {
	Object     interface{}
	Get_       func(i int) Ast
	Interface_ func() interface{}
	New_       func() Ast
	Op_        func() token.Token
	Set_       func(i int, child Ast)
	Size_      func() int
}

--------------- proxy for github.com/cosmos72/gomacro/ast2.Ast ---------------

func (*Ast_github_com_cosmos72_gomacro_ast2) Get

func (*Ast_github_com_cosmos72_gomacro_ast2) Interface

func (Proxy *Ast_github_com_cosmos72_gomacro_ast2) Interface() interface{}

func (*Ast_github_com_cosmos72_gomacro_ast2) New

func (*Ast_github_com_cosmos72_gomacro_ast2) Op

func (*Ast_github_com_cosmos72_gomacro_ast2) Set

func (Proxy *Ast_github_com_cosmos72_gomacro_ast2) Set(i int, child Ast)

func (*Ast_github_com_cosmos72_gomacro_ast2) Size

type BadDecl

type BadDecl struct{ X *ast.BadDecl }

func (BadDecl) Get

func (x BadDecl) Get(i int) Ast

func (BadDecl) Interface

func (x BadDecl) Interface() interface{}

func (BadDecl) New

func (x BadDecl) New() Ast

func (BadDecl) Node

func (x BadDecl) Node() ast.Node

func (BadDecl) Op

func (x BadDecl) Op() token.Token

func (BadDecl) Set

func (x BadDecl) Set(i int, child Ast)

func (BadDecl) Size

func (x BadDecl) Size() int

type BadExpr

type BadExpr struct{ X *ast.BadExpr }

func (BadExpr) Get

func (x BadExpr) Get(i int) Ast

func (BadExpr) Interface

func (x BadExpr) Interface() interface{}

func (BadExpr) New

func (x BadExpr) New() Ast

func (BadExpr) Node

func (x BadExpr) Node() ast.Node

func (BadExpr) Op

func (x BadExpr) Op() token.Token

func (BadExpr) Set

func (x BadExpr) Set(i int, child Ast)

func (BadExpr) Size

func (x BadExpr) Size() int

type BadStmt

type BadStmt struct{ X *ast.BadStmt }

func (BadStmt) Get

func (x BadStmt) Get(i int) Ast

func (BadStmt) Interface

func (x BadStmt) Interface() interface{}

func (BadStmt) New

func (x BadStmt) New() Ast

func (BadStmt) Node

func (x BadStmt) Node() ast.Node

func (BadStmt) Op

func (x BadStmt) Op() token.Token

func (BadStmt) Set

func (x BadStmt) Set(i int, child Ast)

func (BadStmt) Size

func (x BadStmt) Size() int

type BasicLit

type BasicLit struct{ X *ast.BasicLit }

func (BasicLit) Get

func (x BasicLit) Get(i int) Ast

func (BasicLit) Interface

func (x BasicLit) Interface() interface{}

func (BasicLit) New

func (x BasicLit) New() Ast

func (BasicLit) Node

func (x BasicLit) Node() ast.Node

func (BasicLit) Op

func (x BasicLit) Op() token.Token

func (BasicLit) Set

func (x BasicLit) Set(i int, child Ast)

func (BasicLit) Size

func (x BasicLit) Size() int

type BinaryExpr

type BinaryExpr struct{ X *ast.BinaryExpr }

func (BinaryExpr) Get

func (x BinaryExpr) Get(i int) Ast

func (BinaryExpr) Interface

func (x BinaryExpr) Interface() interface{}

func (BinaryExpr) New

func (x BinaryExpr) New() Ast

func (BinaryExpr) Node

func (x BinaryExpr) Node() ast.Node

func (BinaryExpr) Op

func (x BinaryExpr) Op() token.Token

func (BinaryExpr) Set

func (x BinaryExpr) Set(i int, child Ast)

func (BinaryExpr) Size

func (x BinaryExpr) Size() int

type BlockStmt

type BlockStmt struct{ X *ast.BlockStmt }

func (BlockStmt) Append

func (x BlockStmt) Append(child Ast) AstWithSlice

func (BlockStmt) Get

func (x BlockStmt) Get(i int) Ast

func (BlockStmt) Interface

func (x BlockStmt) Interface() interface{}

func (BlockStmt) New

func (x BlockStmt) New() Ast

func (BlockStmt) Node

func (x BlockStmt) Node() ast.Node

func (BlockStmt) Op

func (x BlockStmt) Op() token.Token

func (BlockStmt) Set

func (x BlockStmt) Set(i int, child Ast)

func (BlockStmt) Size

func (x BlockStmt) Size() int

func (BlockStmt) Slice

func (x BlockStmt) Slice(lo, hi int) AstWithSlice

type BranchStmt

type BranchStmt struct{ X *ast.BranchStmt }

func (BranchStmt) Get

func (x BranchStmt) Get(i int) Ast

func (BranchStmt) Interface

func (x BranchStmt) Interface() interface{}

func (BranchStmt) New

func (x BranchStmt) New() Ast

func (BranchStmt) Node

func (x BranchStmt) Node() ast.Node

func (BranchStmt) Op

func (x BranchStmt) Op() token.Token

func (BranchStmt) Set

func (x BranchStmt) Set(i int, child Ast)

func (BranchStmt) Size

func (x BranchStmt) Size() int

type CallExpr

type CallExpr struct{ X *ast.CallExpr }

func (CallExpr) Get

func (x CallExpr) Get(i int) Ast

func (CallExpr) Interface

func (x CallExpr) Interface() interface{}

func (CallExpr) New

func (x CallExpr) New() Ast

func (CallExpr) Node

func (x CallExpr) Node() ast.Node

func (CallExpr) Op

func (x CallExpr) Op() token.Token

func (CallExpr) Set

func (x CallExpr) Set(i int, child Ast)

func (CallExpr) Size

func (x CallExpr) Size() int

type CaseClause

type CaseClause struct{ X *ast.CaseClause }

func (CaseClause) Get

func (x CaseClause) Get(i int) Ast

func (CaseClause) Interface

func (x CaseClause) Interface() interface{}

func (CaseClause) New

func (x CaseClause) New() Ast

func (CaseClause) Node

func (x CaseClause) Node() ast.Node

func (CaseClause) Op

func (x CaseClause) Op() token.Token

func (CaseClause) Set

func (x CaseClause) Set(i int, child Ast)

func (CaseClause) Size

func (x CaseClause) Size() int

type ChanType

type ChanType struct{ X *ast.ChanType }

func (ChanType) Get

func (x ChanType) Get(i int) Ast

func (ChanType) Interface

func (x ChanType) Interface() interface{}

func (ChanType) New

func (x ChanType) New() Ast

func (ChanType) Node

func (x ChanType) Node() ast.Node

func (ChanType) Op

func (x ChanType) Op() token.Token

func (ChanType) Set

func (x ChanType) Set(i int, child Ast)

func (ChanType) Size

func (x ChanType) Size() int

type CommClause

type CommClause struct{ X *ast.CommClause }

func (CommClause) Get

func (x CommClause) Get(i int) Ast

func (CommClause) Interface

func (x CommClause) Interface() interface{}

func (CommClause) New

func (x CommClause) New() Ast

func (CommClause) Node

func (x CommClause) Node() ast.Node

func (CommClause) Op

func (x CommClause) Op() token.Token

func (CommClause) Set

func (x CommClause) Set(i int, child Ast)

func (CommClause) Size

func (x CommClause) Size() int

type CompositeLit

type CompositeLit struct{ X *ast.CompositeLit }

func (CompositeLit) Get

func (x CompositeLit) Get(i int) Ast

func (CompositeLit) Interface

func (x CompositeLit) Interface() interface{}

func (CompositeLit) New

func (x CompositeLit) New() Ast

func (CompositeLit) Node

func (x CompositeLit) Node() ast.Node

func (CompositeLit) Op

func (x CompositeLit) Op() token.Token

func (CompositeLit) Set

func (x CompositeLit) Set(i int, child Ast)

func (CompositeLit) Size

func (x CompositeLit) Size() int

type DeclSlice

type DeclSlice struct{ X []ast.Decl }

func (DeclSlice) Append

func (x DeclSlice) Append(child Ast) AstWithSlice

func (DeclSlice) Get

func (x DeclSlice) Get(i int) Ast

func (DeclSlice) Interface

func (x DeclSlice) Interface() interface{}

func (DeclSlice) New

func (x DeclSlice) New() Ast

func (DeclSlice) Op

func (x DeclSlice) Op() token.Token

func (DeclSlice) Set

func (x DeclSlice) Set(i int, child Ast)

func (DeclSlice) Size

func (x DeclSlice) Size() int

func (DeclSlice) Slice

func (x DeclSlice) Slice(lo, hi int) AstWithSlice

type DeclStmt

type DeclStmt struct{ X *ast.DeclStmt }

func (DeclStmt) Get

func (x DeclStmt) Get(i int) Ast

func (DeclStmt) Interface

func (x DeclStmt) Interface() interface{}

func (DeclStmt) New

func (x DeclStmt) New() Ast

func (DeclStmt) Node

func (x DeclStmt) Node() ast.Node

func (DeclStmt) Op

func (x DeclStmt) Op() token.Token

func (DeclStmt) Set

func (x DeclStmt) Set(i int, child Ast)

func (DeclStmt) Size

func (x DeclStmt) Size() int

type DeferStmt

type DeferStmt struct{ X *ast.DeferStmt }

func (DeferStmt) Get

func (x DeferStmt) Get(i int) Ast

func (DeferStmt) Interface

func (x DeferStmt) Interface() interface{}

func (DeferStmt) New

func (x DeferStmt) New() Ast

func (DeferStmt) Node

func (x DeferStmt) Node() ast.Node

func (DeferStmt) Op

func (x DeferStmt) Op() token.Token

func (DeferStmt) Set

func (x DeferStmt) Set(i int, child Ast)

func (DeferStmt) Size

func (x DeferStmt) Size() int

type Ellipsis

type Ellipsis struct{ X *ast.Ellipsis }

func (Ellipsis) Get

func (x Ellipsis) Get(i int) Ast

func (Ellipsis) Interface

func (x Ellipsis) Interface() interface{}

func (Ellipsis) New

func (x Ellipsis) New() Ast

func (Ellipsis) Node

func (x Ellipsis) Node() ast.Node

func (Ellipsis) Op

func (x Ellipsis) Op() token.Token

func (Ellipsis) Set

func (x Ellipsis) Set(i int, child Ast)

func (Ellipsis) Size

func (x Ellipsis) Size() int

type EmptyStmt

type EmptyStmt struct{ X *ast.EmptyStmt }

func (EmptyStmt) Get

func (x EmptyStmt) Get(i int) Ast

func (EmptyStmt) Interface

func (x EmptyStmt) Interface() interface{}

func (EmptyStmt) New

func (x EmptyStmt) New() Ast

func (EmptyStmt) Node

func (x EmptyStmt) Node() ast.Node

func (EmptyStmt) Op

func (x EmptyStmt) Op() token.Token

func (EmptyStmt) Set

func (x EmptyStmt) Set(i int, child Ast)

func (EmptyStmt) Size

func (x EmptyStmt) Size() int

type ExprSlice

type ExprSlice struct{ X []ast.Expr }

func (ExprSlice) Append

func (x ExprSlice) Append(child Ast) AstWithSlice

func (ExprSlice) Get

func (x ExprSlice) Get(i int) Ast

func (ExprSlice) Interface

func (x ExprSlice) Interface() interface{}

func (ExprSlice) New

func (x ExprSlice) New() Ast

func (ExprSlice) Op

func (x ExprSlice) Op() token.Token

func (ExprSlice) Set

func (x ExprSlice) Set(i int, child Ast)

func (ExprSlice) Size

func (x ExprSlice) Size() int

func (ExprSlice) Slice

func (x ExprSlice) Slice(lo, hi int) AstWithSlice

type ExprStmt

type ExprStmt struct{ X *ast.ExprStmt }

func (ExprStmt) Get

func (x ExprStmt) Get(i int) Ast

func (ExprStmt) Interface

func (x ExprStmt) Interface() interface{}

func (ExprStmt) New

func (x ExprStmt) New() Ast

func (ExprStmt) Node

func (x ExprStmt) Node() ast.Node

func (ExprStmt) Op

func (x ExprStmt) Op() token.Token

func (ExprStmt) Set

func (x ExprStmt) Set(i int, child Ast)

func (ExprStmt) Size

func (x ExprStmt) Size() int

type Field

type Field struct{ X *ast.Field }

func (Field) Get

func (x Field) Get(i int) Ast

func (Field) Interface

func (x Field) Interface() interface{}

func (Field) New

func (x Field) New() Ast

func (Field) Node

func (x Field) Node() ast.Node

func (Field) Op

func (x Field) Op() token.Token

func (Field) Set

func (x Field) Set(i int, child Ast)

func (Field) Size

func (x Field) Size() int

type FieldList

type FieldList struct{ X *ast.FieldList }

func (FieldList) Append

func (x FieldList) Append(child Ast) AstWithSlice

func (FieldList) Get

func (x FieldList) Get(i int) Ast

func (FieldList) Interface

func (x FieldList) Interface() interface{}

func (FieldList) New

func (x FieldList) New() Ast

func (FieldList) Node

func (x FieldList) Node() ast.Node

func (FieldList) Op

func (x FieldList) Op() token.Token

func (FieldList) Set

func (x FieldList) Set(i int, child Ast)

func (FieldList) Size

func (x FieldList) Size() int

func (FieldList) Slice

func (x FieldList) Slice(lo, hi int) AstWithSlice

type FieldSlice

type FieldSlice struct{ X []*ast.Field }

func (FieldSlice) Append

func (x FieldSlice) Append(child Ast) AstWithSlice

func (FieldSlice) Get

func (x FieldSlice) Get(i int) Ast

func (FieldSlice) Interface

func (x FieldSlice) Interface() interface{}

func (FieldSlice) New

func (x FieldSlice) New() Ast

func (FieldSlice) Op

func (x FieldSlice) Op() token.Token

func (FieldSlice) Set

func (x FieldSlice) Set(i int, child Ast)

func (FieldSlice) Size

func (x FieldSlice) Size() int

func (FieldSlice) Slice

func (x FieldSlice) Slice(lo, hi int) AstWithSlice

type File

type File struct{ X *ast.File }

func (File) Append

func (x File) Append(child Ast) AstWithSlice

func (File) Get

func (x File) Get(i int) Ast

func (File) Interface

func (x File) Interface() interface{}

func (File) New

func (x File) New() Ast

func (File) Node

func (x File) Node() ast.Node

func (File) Op

func (x File) Op() token.Token

func (File) Set

func (x File) Set(i int, child Ast)

func (File) Size

func (x File) Size() int

func (File) Slice

func (x File) Slice(lo, hi int) AstWithSlice

type ForStmt

type ForStmt struct{ X *ast.ForStmt }

func (ForStmt) Get

func (x ForStmt) Get(i int) Ast

func (ForStmt) Interface

func (x ForStmt) Interface() interface{}

func (ForStmt) New

func (x ForStmt) New() Ast

func (ForStmt) Node

func (x ForStmt) Node() ast.Node

func (ForStmt) Op

func (x ForStmt) Op() token.Token

func (ForStmt) Set

func (x ForStmt) Set(i int, child Ast)

func (ForStmt) Size

func (x ForStmt) Size() int

type FuncDecl

type FuncDecl struct{ X *ast.FuncDecl }

func (FuncDecl) Get

func (x FuncDecl) Get(i int) Ast

func (FuncDecl) Interface

func (x FuncDecl) Interface() interface{}

func (FuncDecl) New

func (x FuncDecl) New() Ast

func (FuncDecl) Node

func (x FuncDecl) Node() ast.Node

func (FuncDecl) Op

func (x FuncDecl) Op() token.Token

func (FuncDecl) Set

func (x FuncDecl) Set(i int, child Ast)

func (FuncDecl) Size

func (x FuncDecl) Size() int

type FuncLit

type FuncLit struct{ X *ast.FuncLit }

func (FuncLit) Get

func (x FuncLit) Get(i int) Ast

func (FuncLit) Interface

func (x FuncLit) Interface() interface{}

func (FuncLit) New

func (x FuncLit) New() Ast

func (FuncLit) Node

func (x FuncLit) Node() ast.Node

func (FuncLit) Op

func (x FuncLit) Op() token.Token

func (FuncLit) Set

func (x FuncLit) Set(i int, child Ast)

func (FuncLit) Size

func (x FuncLit) Size() int

type FuncType

type FuncType struct{ X *ast.FuncType }

func (FuncType) Get

func (x FuncType) Get(i int) Ast

func (FuncType) Interface

func (x FuncType) Interface() interface{}

func (FuncType) New

func (x FuncType) New() Ast

func (FuncType) Node

func (x FuncType) Node() ast.Node

func (FuncType) Op

func (x FuncType) Op() token.Token

func (FuncType) Set

func (x FuncType) Set(i int, child Ast)

func (FuncType) Size

func (x FuncType) Size() int

type GenDecl

type GenDecl struct{ X *ast.GenDecl }

func (GenDecl) Append

func (x GenDecl) Append(child Ast) AstWithSlice

func (GenDecl) Get

func (x GenDecl) Get(i int) Ast

func (GenDecl) Interface

func (x GenDecl) Interface() interface{}

func (GenDecl) New

func (x GenDecl) New() Ast

func (GenDecl) Node

func (x GenDecl) Node() ast.Node

func (GenDecl) Op

func (x GenDecl) Op() token.Token

func (GenDecl) Set

func (x GenDecl) Set(i int, child Ast)

func (GenDecl) Size

func (x GenDecl) Size() int

func (GenDecl) Slice

func (x GenDecl) Slice(lo, hi int) AstWithSlice

type GoStmt

type GoStmt struct{ X *ast.GoStmt }

func (GoStmt) Get

func (x GoStmt) Get(i int) Ast

func (GoStmt) Interface

func (x GoStmt) Interface() interface{}

func (GoStmt) New

func (x GoStmt) New() Ast

func (GoStmt) Node

func (x GoStmt) Node() ast.Node

func (GoStmt) Op

func (x GoStmt) Op() token.Token

func (GoStmt) Set

func (x GoStmt) Set(i int, child Ast)

func (GoStmt) Size

func (x GoStmt) Size() int

type Ident

type Ident struct{ X *ast.Ident }

func (Ident) Get

func (x Ident) Get(i int) Ast

func (Ident) Interface

func (x Ident) Interface() interface{}

func (Ident) New

func (x Ident) New() Ast

func (Ident) Node

func (x Ident) Node() ast.Node

func (Ident) Op

func (x Ident) Op() token.Token

func (Ident) Set

func (x Ident) Set(i int, child Ast)

func (Ident) Size

func (x Ident) Size() int

type IdentSlice

type IdentSlice struct{ X []*ast.Ident }

func (IdentSlice) Append

func (x IdentSlice) Append(child Ast) AstWithSlice

func (IdentSlice) Get

func (x IdentSlice) Get(i int) Ast

func (IdentSlice) Interface

func (x IdentSlice) Interface() interface{}

func (IdentSlice) New

func (x IdentSlice) New() Ast

func (IdentSlice) Op

func (x IdentSlice) Op() token.Token

func (IdentSlice) Set

func (x IdentSlice) Set(i int, child Ast)

func (IdentSlice) Size

func (x IdentSlice) Size() int

func (IdentSlice) Slice

func (x IdentSlice) Slice(lo, hi int) AstWithSlice

type IfStmt

type IfStmt struct{ X *ast.IfStmt }

func (IfStmt) Get

func (x IfStmt) Get(i int) Ast

func (IfStmt) Interface

func (x IfStmt) Interface() interface{}

func (IfStmt) New

func (x IfStmt) New() Ast

func (IfStmt) Node

func (x IfStmt) Node() ast.Node

func (IfStmt) Op

func (x IfStmt) Op() token.Token

func (IfStmt) Set

func (x IfStmt) Set(i int, child Ast)

func (IfStmt) Size

func (x IfStmt) Size() int

type ImportSpec

type ImportSpec struct{ X *ast.ImportSpec }

func (ImportSpec) Get

func (x ImportSpec) Get(i int) Ast

func (ImportSpec) Interface

func (x ImportSpec) Interface() interface{}

func (ImportSpec) New

func (x ImportSpec) New() Ast

func (ImportSpec) Node

func (x ImportSpec) Node() ast.Node

func (ImportSpec) Op

func (x ImportSpec) Op() token.Token

func (ImportSpec) Set

func (x ImportSpec) Set(i int, child Ast)

func (ImportSpec) Size

func (x ImportSpec) Size() int

type IncDecStmt

type IncDecStmt struct{ X *ast.IncDecStmt }

func (IncDecStmt) Get

func (x IncDecStmt) Get(i int) Ast

func (IncDecStmt) Interface

func (x IncDecStmt) Interface() interface{}

func (IncDecStmt) New

func (x IncDecStmt) New() Ast

func (IncDecStmt) Node

func (x IncDecStmt) Node() ast.Node

func (IncDecStmt) Op

func (x IncDecStmt) Op() token.Token

func (IncDecStmt) Set

func (x IncDecStmt) Set(i int, child Ast)

func (IncDecStmt) Size

func (x IncDecStmt) Size() int

type IndexExpr

type IndexExpr struct{ X *ast.IndexExpr }

func (IndexExpr) Get

func (x IndexExpr) Get(i int) Ast

func (IndexExpr) Interface

func (x IndexExpr) Interface() interface{}

func (IndexExpr) New

func (x IndexExpr) New() Ast

func (IndexExpr) Node

func (x IndexExpr) Node() ast.Node

func (IndexExpr) Op

func (x IndexExpr) Op() token.Token

func (IndexExpr) Set

func (x IndexExpr) Set(i int, child Ast)

func (IndexExpr) Size

func (x IndexExpr) Size() int

type InterfaceType

type InterfaceType struct{ X *ast.InterfaceType }

func (InterfaceType) Get

func (x InterfaceType) Get(i int) Ast

func (InterfaceType) Interface

func (x InterfaceType) Interface() interface{}

func (InterfaceType) New

func (x InterfaceType) New() Ast

func (InterfaceType) Node

func (x InterfaceType) Node() ast.Node

func (InterfaceType) Op

func (x InterfaceType) Op() token.Token

func (InterfaceType) Set

func (x InterfaceType) Set(i int, child Ast)

func (InterfaceType) Size

func (x InterfaceType) Size() int

type KeyValueExpr

type KeyValueExpr struct{ X *ast.KeyValueExpr }

func (KeyValueExpr) Get

func (x KeyValueExpr) Get(i int) Ast

func (KeyValueExpr) Interface

func (x KeyValueExpr) Interface() interface{}

func (KeyValueExpr) New

func (x KeyValueExpr) New() Ast

func (KeyValueExpr) Node

func (x KeyValueExpr) Node() ast.Node

func (KeyValueExpr) Op

func (x KeyValueExpr) Op() token.Token

func (KeyValueExpr) Set

func (x KeyValueExpr) Set(i int, child Ast)

func (KeyValueExpr) Size

func (x KeyValueExpr) Size() int

type LabeledStmt

type LabeledStmt struct{ X *ast.LabeledStmt }

func (LabeledStmt) Get

func (x LabeledStmt) Get(i int) Ast

func (LabeledStmt) Interface

func (x LabeledStmt) Interface() interface{}

func (LabeledStmt) New

func (x LabeledStmt) New() Ast

func (LabeledStmt) Node

func (x LabeledStmt) Node() ast.Node

func (LabeledStmt) Op

func (x LabeledStmt) Op() token.Token

func (LabeledStmt) Set

func (x LabeledStmt) Set(i int, child Ast)

func (LabeledStmt) Size

func (x LabeledStmt) Size() int

type MapType

type MapType struct{ X *ast.MapType }

func (MapType) Get

func (x MapType) Get(i int) Ast

func (MapType) Interface

func (x MapType) Interface() interface{}

func (MapType) New

func (x MapType) New() Ast

func (MapType) Node

func (x MapType) Node() ast.Node

func (MapType) Op

func (x MapType) Op() token.Token

func (MapType) Set

func (x MapType) Set(i int, child Ast)

func (MapType) Size

func (x MapType) Size() int

type NodeSlice

type NodeSlice struct{ X []ast.Node }

func (NodeSlice) Append

func (x NodeSlice) Append(child Ast) AstWithSlice

func (NodeSlice) Get

func (x NodeSlice) Get(i int) Ast

func (NodeSlice) Interface

func (x NodeSlice) Interface() interface{}

func (NodeSlice) New

func (x NodeSlice) New() Ast

func (NodeSlice) Op

func (x NodeSlice) Op() token.Token

func (NodeSlice) Set

func (x NodeSlice) Set(i int, child Ast)

func (NodeSlice) Size

func (x NodeSlice) Size() int

func (NodeSlice) Slice

func (x NodeSlice) Slice(lo, hi int) AstWithSlice

type Package

type Package struct{ X *ast.Package }

func (Package) Get

func (x Package) Get(i int) Ast

func (Package) Interface

func (x Package) Interface() interface{}

func (Package) New

func (x Package) New() Ast

func (Package) Node

func (x Package) Node() ast.Node

func (Package) Op

func (x Package) Op() token.Token

func (Package) Set

func (x Package) Set(i int, child Ast)

func (Package) Size

func (x Package) Size() int

type ParenExpr

type ParenExpr struct{ X *ast.ParenExpr }

func (ParenExpr) Get

func (x ParenExpr) Get(i int) Ast

func (ParenExpr) Interface

func (x ParenExpr) Interface() interface{}

func (ParenExpr) New

func (x ParenExpr) New() Ast

func (ParenExpr) Node

func (x ParenExpr) Node() ast.Node

func (ParenExpr) Op

func (x ParenExpr) Op() token.Token

func (ParenExpr) Set

func (x ParenExpr) Set(i int, child Ast)

func (ParenExpr) Size

func (x ParenExpr) Size() int

type RangeStmt

type RangeStmt struct{ X *ast.RangeStmt }

func (RangeStmt) Get

func (x RangeStmt) Get(i int) Ast

func (RangeStmt) Interface

func (x RangeStmt) Interface() interface{}

func (RangeStmt) New

func (x RangeStmt) New() Ast

func (RangeStmt) Node

func (x RangeStmt) Node() ast.Node

func (RangeStmt) Op

func (x RangeStmt) Op() token.Token

func (RangeStmt) Set

func (x RangeStmt) Set(i int, child Ast)

func (RangeStmt) Size

func (x RangeStmt) Size() int

type ReturnStmt

type ReturnStmt struct{ X *ast.ReturnStmt }

func (ReturnStmt) Append

func (x ReturnStmt) Append(child Ast) AstWithSlice

func (ReturnStmt) Get

func (x ReturnStmt) Get(i int) Ast

func (ReturnStmt) Interface

func (x ReturnStmt) Interface() interface{}

func (ReturnStmt) New

func (x ReturnStmt) New() Ast

do not copy position of "return" keyword. otherwise go/format may insert a newline between "return" and the following expressions

func (ReturnStmt) Node

func (x ReturnStmt) Node() ast.Node

func (ReturnStmt) Op

func (x ReturnStmt) Op() token.Token

func (ReturnStmt) Set

func (x ReturnStmt) Set(i int, child Ast)

func (ReturnStmt) Size

func (x ReturnStmt) Size() int

func (ReturnStmt) Slice

func (x ReturnStmt) Slice(lo, hi int) AstWithSlice

type SelectStmt

type SelectStmt struct{ X *ast.SelectStmt }

func (SelectStmt) Get

func (x SelectStmt) Get(i int) Ast

func (SelectStmt) Interface

func (x SelectStmt) Interface() interface{}

func (SelectStmt) New

func (x SelectStmt) New() Ast

func (SelectStmt) Node

func (x SelectStmt) Node() ast.Node

func (SelectStmt) Op

func (x SelectStmt) Op() token.Token

func (SelectStmt) Set

func (x SelectStmt) Set(i int, child Ast)

func (SelectStmt) Size

func (x SelectStmt) Size() int

type SelectorExpr

type SelectorExpr struct{ X *ast.SelectorExpr }

func (SelectorExpr) Get

func (x SelectorExpr) Get(i int) Ast

func (SelectorExpr) Interface

func (x SelectorExpr) Interface() interface{}

func (SelectorExpr) New

func (x SelectorExpr) New() Ast

func (SelectorExpr) Node

func (x SelectorExpr) Node() ast.Node

func (SelectorExpr) Op

func (x SelectorExpr) Op() token.Token

func (SelectorExpr) Set

func (x SelectorExpr) Set(i int, child Ast)

func (SelectorExpr) Size

func (x SelectorExpr) Size() int

type SendStmt

type SendStmt struct{ X *ast.SendStmt }

func (SendStmt) Get

func (x SendStmt) Get(i int) Ast

func (SendStmt) Interface

func (x SendStmt) Interface() interface{}

func (SendStmt) New

func (x SendStmt) New() Ast

func (SendStmt) Node

func (x SendStmt) Node() ast.Node

func (SendStmt) Op

func (x SendStmt) Op() token.Token

func (SendStmt) Set

func (x SendStmt) Set(i int, child Ast)

func (SendStmt) Size

func (x SendStmt) Size() int

type SliceExpr

type SliceExpr struct{ X *ast.SliceExpr }

func (SliceExpr) Get

func (x SliceExpr) Get(i int) Ast

func (SliceExpr) Interface

func (x SliceExpr) Interface() interface{}

func (SliceExpr) New

func (x SliceExpr) New() Ast

func (SliceExpr) Node

func (x SliceExpr) Node() ast.Node

func (SliceExpr) Op

func (x SliceExpr) Op() token.Token

func (SliceExpr) Set

func (x SliceExpr) Set(i int, child Ast)

func (SliceExpr) Size

func (x SliceExpr) Size() int

type SpecSlice

type SpecSlice struct{ X []ast.Spec }

func (SpecSlice) Append

func (x SpecSlice) Append(child Ast) AstWithSlice

func (SpecSlice) Get

func (x SpecSlice) Get(i int) Ast

func (SpecSlice) Interface

func (x SpecSlice) Interface() interface{}

func (SpecSlice) New

func (x SpecSlice) New() Ast

func (SpecSlice) Op

func (x SpecSlice) Op() token.Token

func (SpecSlice) Set

func (x SpecSlice) Set(i int, child Ast)

func (SpecSlice) Size

func (x SpecSlice) Size() int

func (SpecSlice) Slice

func (x SpecSlice) Slice(lo, hi int) AstWithSlice

type StarExpr

type StarExpr struct{ X *ast.StarExpr }

func (StarExpr) Get

func (x StarExpr) Get(i int) Ast

func (StarExpr) Interface

func (x StarExpr) Interface() interface{}

func (StarExpr) New

func (x StarExpr) New() Ast

func (StarExpr) Node

func (x StarExpr) Node() ast.Node

func (StarExpr) Op

func (x StarExpr) Op() token.Token

func (StarExpr) Set

func (x StarExpr) Set(i int, child Ast)

func (StarExpr) Size

func (x StarExpr) Size() int

type StmtSlice

type StmtSlice struct{ X []ast.Stmt }

func (StmtSlice) Append

func (x StmtSlice) Append(child Ast) AstWithSlice

func (StmtSlice) Get

func (x StmtSlice) Get(i int) Ast

func (StmtSlice) Interface

func (x StmtSlice) Interface() interface{}

func (StmtSlice) New

func (x StmtSlice) New() Ast

func (StmtSlice) Op

func (x StmtSlice) Op() token.Token

func (StmtSlice) Set

func (x StmtSlice) Set(i int, child Ast)

func (StmtSlice) Size

func (x StmtSlice) Size() int

func (StmtSlice) Slice

func (x StmtSlice) Slice(lo, hi int) AstWithSlice

type StructType

type StructType struct{ X *ast.StructType }

func (StructType) Get

func (x StructType) Get(i int) Ast

func (StructType) Interface

func (x StructType) Interface() interface{}

func (StructType) New

func (x StructType) New() Ast

func (StructType) Node

func (x StructType) Node() ast.Node

func (StructType) Op

func (x StructType) Op() token.Token

func (StructType) Set

func (x StructType) Set(i int, child Ast)

func (StructType) Size

func (x StructType) Size() int

type SwitchStmt

type SwitchStmt struct{ X *ast.SwitchStmt }

func (SwitchStmt) Get

func (x SwitchStmt) Get(i int) Ast

func (SwitchStmt) Interface

func (x SwitchStmt) Interface() interface{}

func (SwitchStmt) New

func (x SwitchStmt) New() Ast

func (SwitchStmt) Node

func (x SwitchStmt) Node() ast.Node

func (SwitchStmt) Op

func (x SwitchStmt) Op() token.Token

func (SwitchStmt) Set

func (x SwitchStmt) Set(i int, child Ast)

func (SwitchStmt) Size

func (x SwitchStmt) Size() int

type TypeAssertExpr

type TypeAssertExpr struct{ X *ast.TypeAssertExpr }

func (TypeAssertExpr) Get

func (x TypeAssertExpr) Get(i int) Ast

func (TypeAssertExpr) Interface

func (x TypeAssertExpr) Interface() interface{}

func (TypeAssertExpr) New

func (x TypeAssertExpr) New() Ast

func (TypeAssertExpr) Node

func (x TypeAssertExpr) Node() ast.Node

func (TypeAssertExpr) Op

func (x TypeAssertExpr) Op() token.Token

func (TypeAssertExpr) Set

func (x TypeAssertExpr) Set(i int, child Ast)

func (TypeAssertExpr) Size

func (x TypeAssertExpr) Size() int

type TypeSpec

type TypeSpec struct{ X *ast.TypeSpec }

func (TypeSpec) Get

func (x TypeSpec) Get(i int) Ast

func (TypeSpec) Interface

func (x TypeSpec) Interface() interface{}

func (TypeSpec) New

func (x TypeSpec) New() Ast

func (TypeSpec) Node

func (x TypeSpec) Node() ast.Node

func (TypeSpec) Op

func (x TypeSpec) Op() token.Token

func (TypeSpec) Set

func (x TypeSpec) Set(i int, child Ast)

func (TypeSpec) Size

func (x TypeSpec) Size() int

type TypeSwitchStmt

type TypeSwitchStmt struct{ X *ast.TypeSwitchStmt }

func (TypeSwitchStmt) Get

func (x TypeSwitchStmt) Get(i int) Ast

func (TypeSwitchStmt) Interface

func (x TypeSwitchStmt) Interface() interface{}

func (TypeSwitchStmt) New

func (x TypeSwitchStmt) New() Ast

func (TypeSwitchStmt) Node

func (x TypeSwitchStmt) Node() ast.Node

func (TypeSwitchStmt) Op

func (x TypeSwitchStmt) Op() token.Token

func (TypeSwitchStmt) Set

func (x TypeSwitchStmt) Set(i int, child Ast)

func (TypeSwitchStmt) Size

func (x TypeSwitchStmt) Size() int

type UnaryExpr

type UnaryExpr struct{ X *ast.UnaryExpr }

func (UnaryExpr) Get

func (x UnaryExpr) Get(i int) Ast

func (UnaryExpr) Interface

func (x UnaryExpr) Interface() interface{}

func (UnaryExpr) New

func (x UnaryExpr) New() Ast

func (UnaryExpr) Node

func (x UnaryExpr) Node() ast.Node

func (UnaryExpr) Op

func (x UnaryExpr) Op() token.Token

func (UnaryExpr) Set

func (x UnaryExpr) Set(i int, child Ast)

func (UnaryExpr) Size

func (x UnaryExpr) Size() int

type ValueSpec

type ValueSpec struct{ X *ast.ValueSpec }

func (ValueSpec) Get

func (x ValueSpec) Get(i int) Ast

func (ValueSpec) Interface

func (x ValueSpec) Interface() interface{}

func (ValueSpec) New

func (x ValueSpec) New() Ast

func (ValueSpec) Node

func (x ValueSpec) Node() ast.Node

func (ValueSpec) Op

func (x ValueSpec) Op() token.Token

func (ValueSpec) Set

func (x ValueSpec) Set(i int, child Ast)

func (ValueSpec) Size

func (x ValueSpec) Size() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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