Source File
walk.go
Belonging Package
go/ast
package ast
import
case *Ellipsis:
if .Elt != nil {
(, .Elt)
}
case *FuncLit:
(, .Type)
(, .Body)
case *CompositeLit:
if .Type != nil {
(, .Type)
}
walkExprList(, .Elts)
case *ParenExpr:
(, .X)
case *SelectorExpr:
(, .X)
(, .Sel)
case *IndexExpr:
(, .X)
(, .Index)
case *SliceExpr:
(, .X)
if .Low != nil {
(, .Low)
}
if .High != nil {
(, .High)
}
if .Max != nil {
(, .Max)
}
case *TypeAssertExpr:
(, .X)
if .Type != nil {
(, .Type)
}
case *CallExpr:
(, .Fun)
walkExprList(, .Args)
case *StarExpr:
(, .X)
case *UnaryExpr:
(, .X)
case *BinaryExpr:
(, .X)
(, .Y)
case *KeyValueExpr:
(, .Key)
(, .Value)
case *LabeledStmt:
(, .Label)
(, .Stmt)
case *ExprStmt:
(, .X)
case *SendStmt:
(, .Chan)
(, .Value)
case *IncDecStmt:
(, .X)
case *AssignStmt:
walkExprList(, .Lhs)
walkExprList(, .Rhs)
case *GoStmt:
(, .Call)
case *DeferStmt:
(, .Call)
case *ReturnStmt:
walkExprList(, .Results)
case *BranchStmt:
if .Label != nil {
(, .Label)
}
case *BlockStmt:
walkStmtList(, .List)
case *IfStmt:
if .Init != nil {
(, .Init)
}
(, .Cond)
(, .Body)
if .Else != nil {
(, .Else)
}
case *CaseClause:
walkExprList(, .List)
walkStmtList(, .Body)
case *SwitchStmt:
if .Init != nil {
(, .Init)
}
if .Tag != nil {
(, .Tag)
}
(, .Body)
case *TypeSwitchStmt:
if .Init != nil {
(, .Init)
}
(, .Assign)
(, .Body)
case *CommClause:
if .Comm != nil {
(, .Comm)
}
walkStmtList(, .Body)
case *SelectStmt:
(, .Body)
case *ForStmt:
if .Init != nil {
(, .Init)
}
if .Cond != nil {
(, .Cond)
}
if .Post != nil {
(, .Post)
}
(, .Body)
case *RangeStmt:
if .Key != nil {
(, .Key)
}
if .Value != nil {
(, .Value)
}
(, .X)
(, .Body)
case *ImportSpec:
if .Doc != nil {
(, .Doc)
}
if .Name != nil {
(, .Name)
}
(, .Path)
if .Comment != nil {
(, .Comment)
}
case *ValueSpec:
if .Doc != nil {
(, .Doc)
}
walkIdentList(, .Names)
if .Type != nil {
(, .Type)
}
walkExprList(, .Values)
if .Comment != nil {
(, .Comment)
}
case *TypeSpec:
if .Doc != nil {
(, .Doc)
}
(, .Name)
(, .Type)
if .Comment != nil {
(, .Comment)
}
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |