Versions in this module Expand all Collapse all go1 go1.18.10 Jan 10, 2023 Changes in this version + const Break + const Continue + const Defer + const Fallthrough + const Go + const Goto + const PosMax + func CommentsDo(src io.Reader, handler func(line, col uint, text string)) + func Crawl(root Node, f func(Node) bool) + func ErrorMap(src io.Reader) (errmap map[uint][]Error) + func Fdump(w io.Writer, n Node) (err error) + func Fprint(w io.Writer, x Node, form Form) (n int, err error) + func Inspect(root Node, f func(Node) bool) + func String(n Node) string + func Walk(root Node, v Visitor) + type ArrayType struct + Elem Expr + Len Expr + type AssertExpr struct + Type Expr + X Expr + type AssignStmt struct + Lhs Expr + Op Operator + Rhs Expr + type BadExpr struct + type BasicLit struct + Bad bool + Kind LitKind + Value string + type BlockStmt struct + List []Stmt + Rbrace Pos + type BranchStmt struct + Label *Name + Target Stmt + Tok token + type CallExpr struct + ArgList []Expr + Fun Expr + HasDots bool + type CallStmt struct + Call *CallExpr + Tok token + type CaseClause struct + Body []Stmt + Cases Expr + Colon Pos + func (n *CaseClause) Pos() Pos + type ChanDir uint + const RecvOnly + const SendOnly + type ChanType struct + Dir ChanDir + Elem Expr + type CommClause struct + Body []Stmt + Colon Pos + Comm SimpleStmt + func (n *CommClause) Pos() Pos + type Comment struct + Kind CommentKind + Next *Comment + Text string + type CommentKind uint + const Above + const Below + const Left + const Right + type CompositeLit struct + ElemList []Expr + NKeys int + Rbrace Pos + Type Expr + type ConstDecl struct + Group *Group + NameList []*Name + Pragma Pragma + Type Expr + Values Expr + type Decl interface + type DeclStmt struct + DeclList []Decl + type DotsType struct + Elem Expr + type EmptyStmt struct + type Error struct + Msg string + Pos Pos + func (err Error) Error() string + type ErrorHandler func(err error) + type Expr interface + type ExprStmt struct + X Expr + type Field struct + Name *Name + Type Expr + func (n *Field) Pos() Pos + type File struct + DeclList []Decl + EOF Pos + PkgName *Name + Pragma Pragma + func Parse(base *PosBase, src io.Reader, errh ErrorHandler, pragh PragmaHandler, ...) (_ *File, first error) + func ParseFile(filename string, errh ErrorHandler, pragh PragmaHandler, mode Mode) (*File, error) + func (n *File) Pos() Pos + type ForStmt struct + Body *BlockStmt + Cond Expr + Init SimpleStmt + Post SimpleStmt + type Form uint + const LineForm + const ShortForm + type FuncDecl struct + Body *BlockStmt + Name *Name + Pragma Pragma + Recv *Field + TParamList []*Field + Type *FuncType + type FuncLit struct + Body *BlockStmt + Type *FuncType + type FuncType struct + ParamList []*Field + ResultList []*Field + type Group struct + type IfStmt struct + Cond Expr + Else Stmt + Init SimpleStmt + Then *BlockStmt + type ImportDecl struct + Group *Group + LocalPkgName *Name + Path *BasicLit + Pragma Pragma + type IndexExpr struct + Index Expr + X Expr + type InterfaceType struct + MethodList []*Field + type KeyValueExpr struct + Key Expr + Value Expr + type LabeledStmt struct + Label *Name + Stmt Stmt + type ListExpr struct + ElemList []Expr + type LitKind uint8 + const FloatLit + const ImagLit + const IntLit + const RuneLit + const StringLit + type MapType struct + Key Expr + Value Expr + type Mode uint + const AllowGenerics + const AllowMethodTypeParams + const CheckBranches + type Name struct + Value string + func NewName(pos Pos, value string) *Name + type Node interface + Pos func() Pos + type Operation struct + Op Operator + X Expr + Y Expr + type Operator uint + const Add + const And + const AndAnd + const AndNot + const Def + const Div + const Eql + const Geq + const Gtr + const Leq + const Lss + const Mul + const Neq + const Not + const Or + const OrOr + const Recv + const Rem + const Shl + const Shr + const Sub + const Tilde + const Xor + func (i Operator) String() string + type ParenExpr struct + X Expr + type Pos struct + func EndPos(n Node) Pos + func MakePos(base *PosBase, line, col uint) Pos + func StartPos(n Node) Pos + func (p Pos) Cmp(q Pos) int + func (pos Pos) Base() *PosBase + func (pos Pos) Col() uint + func (pos Pos) IsKnown() bool + func (pos Pos) Line() uint + func (pos Pos) Pos() Pos + func (pos Pos) RelCol() uint + func (pos Pos) RelFilename() string + func (pos Pos) RelLine() uint + func (pos Pos) String() string + type PosBase struct + func NewFileBase(filename string) *PosBase + func NewLineBase(pos Pos, filename string, trimmed bool, line, col uint) *PosBase + func NewTrimmedFileBase(filename string, trimmed bool) *PosBase + func (base *PosBase) Col() uint + func (base *PosBase) Filename() string + func (base *PosBase) IsFileBase() bool + func (base *PosBase) Line() uint + func (base *PosBase) Pos() (_ Pos) + func (base *PosBase) Trimmed() bool + type Pragma interface + type PragmaHandler func(pos Pos, blank bool, text string, current Pragma) Pragma + type RangeClause struct + Def bool + Lhs Expr + X Expr + type ReturnStmt struct + Results Expr + type SelectStmt struct + Body []*CommClause + Rbrace Pos + type SelectorExpr struct + Sel *Name + X Expr + type SendStmt struct + Chan Expr + Value Expr + type SimpleStmt interface + type SliceExpr struct + Full bool + Index [3]Expr + X Expr + type SliceType struct + Elem Expr + type Stmt interface + type StructType struct + FieldList []*Field + TagList []*BasicLit + type SwitchStmt struct + Body []*CaseClause + Init SimpleStmt + Rbrace Pos + Tag Expr + type TypeDecl struct + Alias bool + Group *Group + Name *Name + Pragma Pragma + TParamList []*Field + Type Expr + type TypeSwitchGuard struct + Lhs *Name + X Expr + type VarDecl struct + Group *Group + NameList []*Name + Pragma Pragma + Type Expr + Values Expr + type Visitor interface + Visit func(node Node) (w Visitor)