ast

package
v0.0.0-...-e06ea66 Latest Latest
Warning

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

Go to latest
Published: May 30, 2017 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convertcase

func Convertcase(s string) string

func DoMarshal

func DoMarshal(i interface{}, filename string)

func Generate

func Generate()

Types

type ArrayType

type ArrayType struct {
	Lbrack Foo3
	Elt    Foo2
}

func (*ArrayType) Report

func (t *ArrayType) Report() string

type AssignStmt

type AssignStmt struct {
	Lhs    []Expr
	TokPos Foo3 // position of Tok
	Tok    Foo3
	// assignment token, DEFINE
	Rhs []Expr
}

An AssignStmt node represents an assignment or a short variable declaration.

func (*AssignStmt) Report

func (t *AssignStmt) Report() string

type BadDecl

type BadDecl struct{}

func (*BadDecl) Report

func (t *BadDecl) Report() string

type BadExpr

type BadExpr struct {
	From, To Foo2 // position range of bad expression
}

func (*BadExpr) Report

func (t *BadExpr) Report() string

type BadStmt

type BadStmt struct {
	From, To Foo2 // position range of bad statement
}

A BadStmt node is a placeholder for statements containing syntax errors for which no correct statement nodes can be created.

func (*BadStmt) Report

func (t *BadStmt) Report() string

type BasicLit

type BasicLit struct {
	ValuePos Foo3
	Kind     Foo3
	Value    Foo3
}

func (*BasicLit) Report

func (t *BasicLit) Report() string

type BinaryExpr

type BinaryExpr struct {
	X     Foo2 // left operand
	OpPos Foo3 // position of Op
	Op    Foo3 // operator
	Y     Foo2 // right operand
}

A BinaryExpr node represents a binary expression.

func (*BinaryExpr) Report

func (t *BinaryExpr) Report() string

type BlockStmt

type BlockStmt struct {
	Lbrace Foo3
	List   []Stmt
	Rbrace Foo3
}

func (*BlockStmt) Report

func (t *BlockStmt) Report() string

type BranchStmt

type BranchStmt struct {
	TokPos Foo3
	Tok    Foo3
	// keyword token (BREAK, CONTINUE, GOTO, FALLTHROUGH)
	Label *Ident // label name; or nil
}

A BranchStmt node represents a break, continue, goto, or fallthrough statement.

func (*BranchStmt) Report

func (t *BranchStmt) Report() string

type CallExpr

type CallExpr struct {
	Fun      Expr // function expression
	Lparen   Foo3
	Args     []Expr
	Ellipsis Foo3
	Rparen   Foo3
}

A CallExpr node represents an expression followed by an argument list.

func (*CallExpr) Report

func (t *CallExpr) Report() string

type CaseClause

type CaseClause struct {
	Case  Foo3
	List  []Expr // list of expressions or types; nil means default case
	Colon Foo3
	Body  []Stmt // statement list; or nil
}

A CaseClause represents a case of an expression or type switch statement.

func (*CaseClause) Report

func (t *CaseClause) Report() string

type ChanDir

type ChanDir struct{}

func (*ChanDir) Report

func (t *ChanDir) Report() string

type ChanType

type ChanType struct{}

func (*ChanType) Report

func (t *ChanType) Report() string

type CommClause

type CommClause struct {
	Case  Foo3   // position of "case" or "default" keyword
	Comm  Stmt   // send or receive statement; nil means default case
	Colon Foo3   // position of ":"
	Body  []Stmt // statement list; or nil
}

A CommClause node represents a case of a select statement.

func (*CommClause) Report

func (t *CommClause) Report() string

type Comment

type Comment struct{}

func (*Comment) Report

func (t *Comment) Report() string

type CommentGroup

type CommentGroup struct {
	List []*Comment // len(List) > 0
}

func (*CommentGroup) Report

func (t *CommentGroup) Report() string

type CompositeLit

type CompositeLit struct {
	Type   Expr // literal type; or nil
	Lbrace Foo3
	Elts   []Expr // []list of composite elements; or nil
	Rbrace Foo3
}

A CompositeLit node represents a composite literal.

func (*CompositeLit) Report

func (t *CompositeLit) Report() string

type Decl

type Decl interface {
	Report() string
}

type DeclStmt

type DeclStmt struct {
	Decl Decl // *GenDecl with CONST, TYPE, or VAR token
}

A DeclStmt node represents a declaration in a statement list.

func (*DeclStmt) Report

func (t *DeclStmt) Report() string

func (t* Decl) Report() (string){ r := fmt.Sprintf("Decl:%+v",t);/*fmt.Println(r)*/;return r }

type DeferStmt

type DeferStmt struct {
	Defer Foo3
	Call  *CallExpr
}

A DeferStmt node represents a defer statement.

func (*DeferStmt) Report

func (t *DeferStmt) Report() string

type Deferred

type Deferred struct {
	Id string
	//Data  Foo2
	//Data  int64
	Set interface{}
}

deferred

func (*Deferred) Report

func (t *Deferred) Report() string

type Ellipsis

type Ellipsis struct {
	Ellipsis Foo3 // position of "..."
	Elt      Expr // ellipsis element type (parameter lists only); or nil
}

An Ellipsis node stands for the "..." type in a parameter list or the "..." length in an array type.

func (*Ellipsis) Report

func (t *Ellipsis) Report() string

type EmptyStmt

type EmptyStmt struct {
	Semicolon Foo2 // position of following ";"
	Implicit  bool // if set, ";" was omitted in the source
}

An EmptyStmt node represents an empty statement. The "position" of the empty statement is the position of the immediately following (explicit or implicit) semicolon.

func (*EmptyStmt) Report

func (t *EmptyStmt) Report() string

type Expr

type Expr interface {
	Report() string
}

type ExprStmt

type ExprStmt struct {
	X Foo2 // expression
}

An ExprStmt node represents a (stand-alone) expression in a statement list.

func (*ExprStmt) Report

func (t *ExprStmt) Report() string

func (t* Expr) Report() (string){ r := fmt.Sprintf("Expr:%+v",t);/*fmt.Println(r)*/;return r }

type Field

type Field struct {
	Doc     *CommentGroup
	Names   []*Ident
	Type    Expr
	Tag     *BasicLit
	Comment *CommentGroup
}

func (*Field) Report

func (t *Field) Report() string

func (*Field) ToString

func (f *Field) ToString() string

type FieldDeferred

type FieldDeferred struct {
	Id string
}

func (*FieldDeferred) Report

func (t *FieldDeferred) Report() string

type FieldInterface

type FieldInterface interface {
	Report() string
}

type FieldList

type FieldList struct {
	Opening Foo3
	List    []*Field
	Closing Foo3
}

func (*FieldList) Report

func (f *FieldList) Report() string

func (t* FieldList) Report() (string){ r := fmt.Sprintf("FieldList:%+v",t);/*fmt.Println(r)*/;return r }

type File

type File struct {
	Doc        *CommentGroup
	Package    Foo3
	Name       *Ident
	Decls      []Decl
	Scope      *Scope
	Imports    []*ImportSpec
	Unresolved []*Ident
	Comments   []*CommentGroup
}

func (*File) Report

func (t *File) Report() string

type Foo2

type Foo2 interface {
	Report() string
}

type Foo3

type Foo3 interface {
}

type ForStmt

type ForStmt struct {
	For  Foo3 // position of "for" keyword
	Init Stmt // initialization statement; or nil
	Cond Expr // condition; or nil
	Post Stmt // post iteration statement; or nil
	Body *BlockStmt
}

A ForStmt represents a for statement.

func (*ForStmt) Report

func (t *ForStmt) Report() string

type FuncDecl

type FuncDecl struct {
	Doc  *CommentGroup // associated documentation; or nil
	Recv *FieldList    // receiver (methods); or nil (functions)
	Name *Ident        // function/method name
	Type *FuncType     // function signature: parameters, results, and position of "func" keyword
	Body *BlockStmt    // function body; or nil (forward declaration)
}

func (*FuncDecl) Report

func (t *FuncDecl) Report() string

type FuncLit

type FuncLit struct {
	Type *FuncType  // function type
	Body *BlockStmt // function body
}

A FuncLit node represents a function literal.

func (*FuncLit) Report

func (t *FuncLit) Report() string

type FuncType

type FuncType struct {
	Func    Foo3
	Params  Foo2
	Results *FieldList
}

func (*FuncType) Report

func (t *FuncType) Report() string

type GenDecl

type GenDecl struct {
	TokPos Foo3
	Tok    Foo3
	Lparen Foo3
	Specs  []Spec
	Rparen Foo3
}

func (*GenDecl) Report

func (t *GenDecl) Report() string

type GoStmt

type GoStmt struct {
	Go   Foo2 // position of "go" keyword
	Call *CallExpr
}

A GoStmt node represents a go statement.

func (*GoStmt) Report

func (t *GoStmt) Report() string

type Ident

type Ident struct {
	NamePos Foo3
	Name    string
	Obj     Foo2
}

func (*Ident) Report

func (t *Ident) Report() string

func (*Ident) ToString

func (f *Ident) ToString() string

type IfStmt

type IfStmt struct {
	If   Foo3
	Init Stmt // initialization statement; or nil
	Cond Expr // condition
	Body *BlockStmt
	Else Stmt // else branch; or nil
}

An IfStmt node represents an if statement.

func (*IfStmt) Report

func (t *IfStmt) Report() string

type ImportSpec

type ImportSpec struct {
	Name   *Ident
	Path   *BasicLit
	EndPos Foo3
}

func (*ImportSpec) Report

func (t *ImportSpec) Report() string

type IncDecStmt

type IncDecStmt struct {
	X      Foo2
	TokPos Foo3 // position of Tok
	Tok    Foo3
}

An IncDecStmt node represents an increment or decrement statement.

func (*IncDecStmt) Report

func (t *IncDecStmt) Report() string

type IndexExpr

type IndexExpr struct {
	X      Foo2 // expression
	Lbrack Foo3
	Index  Foo2 // index expression
	Rbrack Foo3
}

An IndexExpr node represents an expression followed by an index.

func (*IndexExpr) Report

func (t *IndexExpr) Report() string

type InterfaceType

type InterfaceType struct {
	Interface  Foo3
	Methods    *FieldList
	Incomplete bool
}

func (*InterfaceType) Report

func (t *InterfaceType) Report() string

type IsExported

type IsExported struct{}

func (*IsExported) Report

func (t *IsExported) Report() string

type KeyValueExpr

type KeyValueExpr struct {
	Key   Foo2
	Colon Foo2 // position of ":"
	Value Foo2
}

A KeyValueExpr node represents (key : value) pairs in composite literals.

func (*KeyValueExpr) Report

func (t *KeyValueExpr) Report() string

type LabeledStmt

type LabeledStmt struct {
	Label *Ident
	Colon Foo3 // position of ":"
	Stmt  Stmt
}

A LabeledStmt node represents a labeled statement.

func (*LabeledStmt) Report

func (t *LabeledStmt) Report() string

type MapType

type MapType struct {
	Map   Foo3
	Key   Expr
	Value Expr
}

func (*MapType) Report

func (t *MapType) Report() string

type NewIdent

type NewIdent struct{}

func (*NewIdent) Report

func (t *NewIdent) Report() string

type Node

type Node struct{}

func (*Node) Report

func (t *Node) Report() string

type Object

type Object struct {
	Deferred *Deferred

	Kind Foo3
	Name Foo3
	Decl Foo2
	Data Foo3
}

func (*Object) Report

func (t *Object) Report() string

type ObjectDeferred

type ObjectDeferred struct {
	Id string
}

func (*ObjectDeferred) Report

func (t *ObjectDeferred) Report() string

type Package

type Package struct {
	Name    string             // package name
	Scope   Foo2               // package scope across all files
	Imports map[string]*Object // map of package id -> package object
	Files   map[string]*File   // Go source files by filename
}

func (*Package) Report

func (t *Package) Report() string

type ParenExpr

type ParenExpr struct {
	Lparen Foo3
	X      Foo2 // parenthesized expression
	Rparen Foo3
}

A ParenFoo2 node represents a parenthesized expression.

func (*ParenExpr) Report

func (t *ParenExpr) Report() string

type RangeStmt

type RangeStmt struct {
	For        Foo3
	Key, Value Expr // Key, Value may be nil
	TokPos     Foo3
	Tok        Foo3 // ILLEGAL if Key == nil, ASSIGN, DEFINE
	X          Expr //Expr        // value to range over
	Body       *BlockStmt
}

A RangeStmt represents a for statement with a range clause.

func (*RangeStmt) Report

func (t *RangeStmt) Report() string

type ReturnStmt

type ReturnStmt struct {
	Return  Foo3
	Results []Expr // result expressions; or nil
}

A ReturnStmt node represents a return statement.

func (*ReturnStmt) Report

func (t *ReturnStmt) Report() string

type Scope

type Scope struct {
	Objects map[string]*Object
}

func (*Scope) Report

func (t *Scope) Report() string

type SelectStmt

type SelectStmt struct {
	Select Foo3       // position of "select" keyword
	Body   *BlockStmt // CommClauses only
}

An SelectStmt node represents a select statement.

func (*SelectStmt) Report

func (t *SelectStmt) Report() string

type SelectorExpr

type SelectorExpr struct {
	X   Expr
	Sel *Ident
}

func (*SelectorExpr) Report

func (t *SelectorExpr) Report() string

type SendStmt

type SendStmt struct {
	Chan  Expr
	Arrow Foo2 // position of "<-"
	Value Expr
}

A SendStmt node represents a send statement.

func (*SendStmt) Report

func (t *SendStmt) Report() string

type SliceExpr

type SliceExpr struct {
	X      Expr // expression
	Lbrack Foo3
	Low    Expr // begin of slice range; or nil
	High   Expr // end of slice range; or nil
	Max    Expr // maximum capacity of slice; or nil
	Slice3 bool // true if 3-index slice (2 colons present)
	Rbrack Foo3
}

An SliceExpr node represents an expression followed by slice indices.

func (*SliceExpr) Report

func (t *SliceExpr) Report() string

type Spec

type Spec interface {
	Report() string
}

type StarArrayType

type StarArrayType struct{}

type StarExpr

type StarExpr struct {
	Star Foo3
	X    Foo2
}

func (*StarExpr) Report

func (t *StarExpr) Report() string

type Stmt

type Stmt interface {
	Report() string
}

type StructType

type StructType struct {
	Struct     Foo3
	Fields     *FieldList
	Incomplete bool
}

func (*StructType) Report

func (t *StructType) Report() string

func (t* Stmt) Report() (string){ r := fmt.Sprintf("Stmt:%+v",t);/*fmt.Println(r)*/;return r }

type SwitchCaseClause

type SwitchCaseClause struct{}

type SwitchStmt

type SwitchStmt struct {
	Switch Foo3       // position of "switch" keyword
	Init   Stmt       // initialization statement; or nil
	Tag    Expr       // tag expression; or nil
	Body   *BlockStmt // CaseClauses only
}

A SwitchStmt node represents an expression switch statement.

func (*SwitchStmt) Report

func (t *SwitchStmt) Report() string

type Table

type Table struct {
	Visitors        []Visitor
	Scopes          map[string]*Scope
	Objects         map[string]*Object
	ArrayTypes      map[string]*ArrayType
	AssignStmts     map[string]*AssignStmt
	BadDecls        map[string]*BadDecl
	BadExprs        map[string]*BadExpr
	BadStmts        map[string]*BadStmt
	BasicLits       map[string]*BasicLit
	BinaryExprs     map[string]*BinaryExpr
	BlockStmts      map[string]*BlockStmt
	BranchStmts     map[string]*BranchStmt
	CallExprs       map[string]*CallExpr
	CaseClauses     map[string]*CaseClause
	ChanDirs        map[string]*ChanDir
	ChanTypes       map[string]*ChanType
	CommClauses     map[string]*CommClause
	CommentGroups   map[string]*CommentGroup
	Comments        map[string]*Comment
	CompositeLits   map[string]*CompositeLit
	DeclStmts       map[string]*DeclStmt
	DeferStmts      map[string]*DeferStmt
	Ellipsiss       map[string]*Ellipsis
	EmptyStmts      map[string]*EmptyStmt
	ExprStmts       map[string]*ExprStmt
	FieldLists      map[string]*FieldList
	Fields          map[string]*Field
	Files           map[string]*File
	ForStmts        map[string]*ForStmt
	FuncDecls       map[string]*FuncDecl
	FuncLits        map[string]*FuncLit
	FuncTypes       map[string]*FuncType
	GenDecls        map[string]*GenDecl
	GoStmts         map[string]*GoStmt
	Idents          map[string]*Ident
	IfStmts         map[string]*IfStmt
	ImportSpecs     map[string]*ImportSpec
	IncDecStmts     map[string]*IncDecStmt
	IndexExprs      map[string]*IndexExpr
	InterfaceTypes  map[string]*InterfaceType
	IsExporteds     map[string]*IsExported
	KeyValueExprs   map[string]*KeyValueExpr
	LabeledStmts    map[string]*LabeledStmt
	MapTypes        map[string]*MapType
	NewIdents       map[string]*NewIdent
	Nodes           map[string]*Node
	Packages        map[string]*Package
	ParenExprs      map[string]*ParenExpr
	RangeStmts      map[string]*RangeStmt
	ReturnStmts     map[string]*ReturnStmt
	SelectStmts     map[string]*SelectStmt
	SelectorExprs   map[string]*SelectorExpr
	SendStmts       map[string]*SendStmt
	SliceExprs      map[string]*SliceExpr
	StarExprs       map[string]*StarExpr
	StructTypes     map[string]*StructType
	SwitchStmts     map[string]*SwitchStmt
	TypeAssertExprs map[string]*TypeAssertExpr
	TypeSpecs       map[string]*TypeSpec
	TypeSwitchStmts map[string]*TypeSwitchStmt
	UnaryExprs      map[string]*UnaryExpr
	ValueSpecs      map[string]*ValueSpec
	// interfaces
	Specs map[string]Spec
	Decls map[string]Decl
	Exprs map[string]Expr
	Stmts map[string]Stmt
}

func CreateTable

func CreateTable() *Table

func (*Table) AddVisitor

func (t *Table) AddVisitor(v Visitor)

func (*Table) PtrmapArrayType

func (t *Table) PtrmapArrayType(id string) *ArrayType

func (*Table) PtrmapAssignStmt

func (t *Table) PtrmapAssignStmt(id string) *AssignStmt

func (*Table) PtrmapBadDecl

func (t *Table) PtrmapBadDecl(id string) *BadDecl

func (*Table) PtrmapBadExpr

func (t *Table) PtrmapBadExpr(id string) *BadExpr

func (*Table) PtrmapBadStmt

func (t *Table) PtrmapBadStmt(id string) *BadStmt

func (*Table) PtrmapBasicLit

func (t *Table) PtrmapBasicLit(id string) *BasicLit

func (*Table) PtrmapBinaryExpr

func (t *Table) PtrmapBinaryExpr(id string) *BinaryExpr

func (*Table) PtrmapBlockStmt

func (t *Table) PtrmapBlockStmt(id string) *BlockStmt

func (*Table) PtrmapBranchStmt

func (t *Table) PtrmapBranchStmt(id string) *BranchStmt

func (*Table) PtrmapCallExpr

func (t *Table) PtrmapCallExpr(id string) *CallExpr

func (*Table) PtrmapCaseClause

func (t *Table) PtrmapCaseClause(id string) *CaseClause

func (*Table) PtrmapChanDir

func (t *Table) PtrmapChanDir(id string) *ChanDir

func (*Table) PtrmapChanType

func (t *Table) PtrmapChanType(id string) *ChanType

func (*Table) PtrmapCommClause

func (t *Table) PtrmapCommClause(id string) *CommClause

func (*Table) PtrmapComment

func (t *Table) PtrmapComment(id string) *Comment

func (*Table) PtrmapCommentGroup

func (t *Table) PtrmapCommentGroup(id string) *CommentGroup

func (*Table) PtrmapCompositeLit

func (t *Table) PtrmapCompositeLit(id string) *CompositeLit

func (*Table) PtrmapDecl

func (t *Table) PtrmapDecl(id string) Decl

func (*Table) PtrmapDeclStmt

func (t *Table) PtrmapDeclStmt(id string) *DeclStmt

func (*Table) PtrmapDeferStmt

func (t *Table) PtrmapDeferStmt(id string) *DeferStmt

func (*Table) PtrmapEllipsis

func (t *Table) PtrmapEllipsis(id string) *Ellipsis

func (*Table) PtrmapEmptyStmt

func (t *Table) PtrmapEmptyStmt(id string) *EmptyStmt

func (*Table) PtrmapExpr

func (t *Table) PtrmapExpr(id string) Expr

func (*Table) PtrmapExprStmt

func (t *Table) PtrmapExprStmt(id string) *ExprStmt

func (*Table) PtrmapField

func (t *Table) PtrmapField(id string) Foo2

func (*Table) PtrmapFieldList

func (t *Table) PtrmapFieldList(id string) Foo2

func (*Table) PtrmapFile

func (t *Table) PtrmapFile(id string) *File

func (*Table) PtrmapForStmt

func (t *Table) PtrmapForStmt(id string) *ForStmt

func (*Table) PtrmapFuncDecl

func (t *Table) PtrmapFuncDecl(id string) *FuncDecl

func (*Table) PtrmapFuncLit

func (t *Table) PtrmapFuncLit(id string) *FuncLit

func (*Table) PtrmapFuncType

func (t *Table) PtrmapFuncType(id string) *FuncType

func (*Table) PtrmapGenDecl

func (t *Table) PtrmapGenDecl(id string) *GenDecl

func (*Table) PtrmapGoStmt

func (t *Table) PtrmapGoStmt(id string) *GoStmt

func (*Table) PtrmapIdent

func (t *Table) PtrmapIdent(id string) *Ident

func (*Table) PtrmapIfStmt

func (t *Table) PtrmapIfStmt(id string) *IfStmt

func (*Table) PtrmapImportSpec

func (t *Table) PtrmapImportSpec(id string) *ImportSpec

func (*Table) PtrmapIncDecStmt

func (t *Table) PtrmapIncDecStmt(id string) *IncDecStmt

func (*Table) PtrmapIndexExpr

func (t *Table) PtrmapIndexExpr(id string) *IndexExpr

func (*Table) PtrmapInterfaceType

func (t *Table) PtrmapInterfaceType(id string) *InterfaceType

func (*Table) PtrmapIsExported

func (t *Table) PtrmapIsExported(id string) *IsExported

func (*Table) PtrmapKeyValueExpr

func (t *Table) PtrmapKeyValueExpr(id string) *KeyValueExpr

func (*Table) PtrmapLabeledStmt

func (t *Table) PtrmapLabeledStmt(id string) *LabeledStmt

func (*Table) PtrmapMapType

func (t *Table) PtrmapMapType(id string) *MapType

func (*Table) PtrmapNewIdent

func (t *Table) PtrmapNewIdent(id string) *NewIdent

func (*Table) PtrmapNode

func (t *Table) PtrmapNode(id string) *Node

func (*Table) PtrmapObject

func (t *Table) PtrmapObject(id string) *Object

func (*Table) PtrmapPackage

func (t *Table) PtrmapPackage(id string) *Package

func (*Table) PtrmapParenExpr

func (t *Table) PtrmapParenExpr(id string) *ParenExpr

func (*Table) PtrmapRangeStmt

func (t *Table) PtrmapRangeStmt(id string) *RangeStmt

func (*Table) PtrmapReturnStmt

func (t *Table) PtrmapReturnStmt(id string) *ReturnStmt

func (*Table) PtrmapSelectStmt

func (t *Table) PtrmapSelectStmt(id string) *SelectStmt

func (*Table) PtrmapSelectorExpr

func (t *Table) PtrmapSelectorExpr(id string) *SelectorExpr

func (*Table) PtrmapSendStmt

func (t *Table) PtrmapSendStmt(id string) *SendStmt

func (*Table) PtrmapSliceExpr

func (t *Table) PtrmapSliceExpr(id string) *SliceExpr

func (*Table) PtrmapSpec

func (t *Table) PtrmapSpec(id string) Spec

func (*Table) PtrmapStarExpr

func (t *Table) PtrmapStarExpr(id string) *StarExpr

func (*Table) PtrmapStmt

func (t *Table) PtrmapStmt(id string) Stmt

func (*Table) PtrmapStructType

func (t *Table) PtrmapStructType(id string) *StructType

func (*Table) PtrmapSwitchStmt

func (t *Table) PtrmapSwitchStmt(id string) *SwitchStmt

func (*Table) PtrmapTypeAssertExpr

func (t *Table) PtrmapTypeAssertExpr(id string) *TypeAssertExpr

func (*Table) PtrmapTypeSpec

func (t *Table) PtrmapTypeSpec(id string) Foo2

func (*Table) PtrmapTypeSwitchStmt

func (t *Table) PtrmapTypeSwitchStmt(id string) *TypeSwitchStmt

func (*Table) PtrmapUnaryExpr

func (t *Table) PtrmapUnaryExpr(id string) *UnaryExpr

func (*Table) PtrmapValueSpec

func (t *Table) PtrmapValueSpec(id string) *ValueSpec

func (*Table) StrmapArrayType

func (t *Table) StrmapArrayType(id string, f *ArrayType) *ArrayType

func (*Table) StrmapAssignStmt

func (t *Table) StrmapAssignStmt(id string, f *AssignStmt) *AssignStmt

func (*Table) StrmapBadDecl

func (t *Table) StrmapBadDecl(id string, f *BadDecl) *BadDecl

func (*Table) StrmapBadExpr

func (t *Table) StrmapBadExpr(id string, f *BadExpr) *BadExpr

func (*Table) StrmapBadStmt

func (t *Table) StrmapBadStmt(id string, f *BadStmt) *BadStmt

func (*Table) StrmapBasicLit

func (t *Table) StrmapBasicLit(id string, f *BasicLit) *BasicLit

func (*Table) StrmapBinaryExpr

func (t *Table) StrmapBinaryExpr(id string, f *BinaryExpr) *BinaryExpr

func (*Table) StrmapBlockStmt

func (t *Table) StrmapBlockStmt(id string, f *BlockStmt) *BlockStmt

func (*Table) StrmapBranchStmt

func (t *Table) StrmapBranchStmt(id string, f *BranchStmt) *BranchStmt

func (*Table) StrmapCallExpr

func (t *Table) StrmapCallExpr(id string, f *CallExpr) *CallExpr

func (*Table) StrmapCaseClause

func (t *Table) StrmapCaseClause(id string, f *CaseClause) *CaseClause

func (*Table) StrmapChanDir

func (t *Table) StrmapChanDir(id string, f *ChanDir) *ChanDir

func (*Table) StrmapChanType

func (t *Table) StrmapChanType(id string, f *ChanType) *ChanType

func (*Table) StrmapCommClause

func (t *Table) StrmapCommClause(id string, f *CommClause) *CommClause

func (*Table) StrmapComment

func (t *Table) StrmapComment(id string, f *Comment) *Comment

func (*Table) StrmapCommentGroup

func (t *Table) StrmapCommentGroup(id string, f *CommentGroup) *CommentGroup

func (*Table) StrmapCompositeLit

func (t *Table) StrmapCompositeLit(id string, f *CompositeLit) *CompositeLit

func (*Table) StrmapDecl

func (t *Table) StrmapDecl(id string, f Decl) Decl

func (*Table) StrmapDeclStmt

func (t *Table) StrmapDeclStmt(id string, f *DeclStmt) *DeclStmt

func (*Table) StrmapDeferStmt

func (t *Table) StrmapDeferStmt(id string, f *DeferStmt) *DeferStmt

func (*Table) StrmapEllipsis

func (t *Table) StrmapEllipsis(id string, f *Ellipsis) *Ellipsis

func (*Table) StrmapEmptyStmt

func (t *Table) StrmapEmptyStmt(id string, f *EmptyStmt) *EmptyStmt

func (*Table) StrmapExpr

func (t *Table) StrmapExpr(id string, f Expr) Expr

func (*Table) StrmapExprStmt

func (t *Table) StrmapExprStmt(id string, f *ExprStmt) *ExprStmt

func (*Table) StrmapField

func (t *Table) StrmapField(id string, f *Field) *Field

func (*Table) StrmapFieldList

func (t *Table) StrmapFieldList(id string, f *FieldList) *FieldList

func (*Table) StrmapFile

func (t *Table) StrmapFile(id string, f *File) *File

func (*Table) StrmapForStmt

func (t *Table) StrmapForStmt(id string, f *ForStmt) *ForStmt

func (*Table) StrmapFuncDecl

func (t *Table) StrmapFuncDecl(id string, f *FuncDecl) Foo2

func (*Table) StrmapFuncLit

func (t *Table) StrmapFuncLit(id string, f *FuncLit) *FuncLit

func (*Table) StrmapFuncType

func (t *Table) StrmapFuncType(id string, f *FuncType) *FuncType

func (*Table) StrmapGenDecl

func (t *Table) StrmapGenDecl(id string, f *GenDecl) *GenDecl

func (*Table) StrmapGoStmt

func (t *Table) StrmapGoStmt(id string, f *GoStmt) *GoStmt

func (*Table) StrmapIdent

func (t *Table) StrmapIdent(id string, f *Ident) *Ident

func (*Table) StrmapIfStmt

func (t *Table) StrmapIfStmt(id string, f *IfStmt) *IfStmt

func (*Table) StrmapImportSpec

func (t *Table) StrmapImportSpec(id string, f *ImportSpec) *ImportSpec

func (*Table) StrmapIncDecStmt

func (t *Table) StrmapIncDecStmt(id string, f *IncDecStmt) *IncDecStmt

func (*Table) StrmapIndexExpr

func (t *Table) StrmapIndexExpr(id string, f *IndexExpr) *IndexExpr

func (*Table) StrmapInterfaceType

func (t *Table) StrmapInterfaceType(id string, f *InterfaceType) *InterfaceType

func (*Table) StrmapIsExported

func (t *Table) StrmapIsExported(id string, f *IsExported) *IsExported

func (*Table) StrmapKeyValueExpr

func (t *Table) StrmapKeyValueExpr(id string, f *KeyValueExpr) *KeyValueExpr

func (*Table) StrmapLabeledStmt

func (t *Table) StrmapLabeledStmt(id string, f *LabeledStmt) *LabeledStmt

func (*Table) StrmapMapType

func (t *Table) StrmapMapType(id string, f *MapType) *MapType

func (*Table) StrmapNewIdent

func (t *Table) StrmapNewIdent(id string, f *NewIdent) *NewIdent

func (*Table) StrmapNode

func (t *Table) StrmapNode(id string, f *Node) *Node

func (*Table) StrmapObject

func (t *Table) StrmapObject(id string, f *Object) *Object

func (*Table) StrmapPackage

func (t *Table) StrmapPackage(id string, f *Package) *Package

func (*Table) StrmapParenExpr

func (t *Table) StrmapParenExpr(id string, f *ParenExpr) *ParenExpr

func (*Table) StrmapRangeStmt

func (t *Table) StrmapRangeStmt(id string, f *RangeStmt) *RangeStmt

func (*Table) StrmapReturnStmt

func (t *Table) StrmapReturnStmt(id string, f *ReturnStmt) *ReturnStmt

func (*Table) StrmapScope

func (t *Table) StrmapScope(id string, f *Scope) *Scope

outer section is scope

func (*Table) StrmapSelectStmt

func (t *Table) StrmapSelectStmt(id string, f *SelectStmt) *SelectStmt

func (*Table) StrmapSelectorExpr

func (t *Table) StrmapSelectorExpr(id string, f *SelectorExpr) *SelectorExpr

func (*Table) StrmapSendStmt

func (t *Table) StrmapSendStmt(id string, f *SendStmt) *SendStmt

func (*Table) StrmapSliceExpr

func (t *Table) StrmapSliceExpr(id string, f *SliceExpr) *SliceExpr

func (*Table) StrmapSpec

func (t *Table) StrmapSpec(id string, f Spec) Spec

func (*Table) StrmapStarExpr

func (t *Table) StrmapStarExpr(id string, f *StarExpr) *StarExpr

func (*Table) StrmapStmt

func (t *Table) StrmapStmt(id string, f Stmt) Stmt

func (*Table) StrmapStructType

func (t *Table) StrmapStructType(id string, f *StructType) *StructType

func (*Table) StrmapSwitchStmt

func (t *Table) StrmapSwitchStmt(id string, f *SwitchStmt) *SwitchStmt

func (*Table) StrmapTypeAssertExpr

func (t *Table) StrmapTypeAssertExpr(id string, f *TypeAssertExpr) *TypeAssertExpr

func (*Table) StrmapTypeSpec

func (t *Table) StrmapTypeSpec(id string, f *TypeSpec) *TypeSpec

func (*Table) StrmapTypeSwitchStmt

func (t *Table) StrmapTypeSwitchStmt(id string, f *TypeSwitchStmt) *TypeSwitchStmt

func (*Table) StrmapUnaryExpr

func (t *Table) StrmapUnaryExpr(id string, f *UnaryExpr) *UnaryExpr

func (*Table) StrmapValueSpec

func (t *Table) StrmapValueSpec(id string, f *ValueSpec) Foo2

type Type

type Type interface {
	Report() string
}

type TypeAssertExpr

type TypeAssertExpr struct {
	X      Expr // expression
	Lparen Foo3
	Type   Expr // asserted type; nil means type switch X.(type)
	Rparen Foo3
}

A TypeAssertExpr node represents an expression followed by a type assertion.

func (*TypeAssertExpr) Report

func (t *TypeAssertExpr) Report() string

type TypeSpec

type TypeSpec struct {
	Doc     *CommentGroup
	Name    *Ident
	Type    Expr
	Comment *CommentGroup
}

func (*TypeSpec) Report

func (t *TypeSpec) Report() string

type TypeSwitchStmt

type TypeSwitchStmt struct {
	Switch Foo3       // position of "switch" keyword
	Init   Stmt       // initialization statement; or nil
	Assign Stmt       // x := y.(type) or y.(type)
	Body   *BlockStmt // CaseClauses only
}

An TypeSwitchStmt node represents a type switch statement.

func (*TypeSwitchStmt) Report

func (t *TypeSwitchStmt) Report() string

type UnaryExpr

type UnaryExpr struct {
	OpPos Foo3
	Op    Foo3 // operator
	X     Expr // operand
}

A UnaryExpr node represents a unary expression. Unary "*" expressions are represented via StarExpr nodes.

func (*UnaryExpr) Report

func (t *UnaryExpr) Report() string

type ValueSpec

type ValueSpec struct {
	Doc    *CommentGroup
	Names  []*Ident
	Type   Expr
	Values []Expr
}

func (*ValueSpec) Report

func (t *ValueSpec) Report() string

type Visitor

type Visitor interface {
	VisitScope(t *Table, s *Scope)
}

Directories

Path Synopsis
Package astproto is a generated protocol buffer package.
Package astproto is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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