Versions in this module Expand all Collapse all v0 v0.2.8 Nov 4, 2024 v0.2.7 Oct 31, 2024 v0.2.6 Oct 24, 2024 v0.2.5 Oct 16, 2024 v0.2.4 Oct 14, 2024 Changes in this version + func Inspect(node Node, f func(Node) bool) + func TrimComments(comments []string) []string + func Walk(v Visitor, node Node) + type Annotation struct + At token.Pos + Lparen token.Pos + Name *Ident + Params []*AnnotationParam + Rparen token.Pos + func (a *Annotation) End() token.Pos + func (a *Annotation) Pos() token.Pos + type AnnotationGroup struct + List []*Annotation + func (g *AnnotationGroup) End() token.Pos + func (g *AnnotationGroup) Pos() token.Pos + type AnnotationParam struct + AssignPos token.Pos + Name *Ident + Value Node + func (p *AnnotationParam) End() token.Pos + func (p *AnnotationParam) Pos() token.Pos + type ArrayType struct + Array token.Pos + GT token.Pos + N Expr + T Type + func (x *ArrayType) End() token.Pos + func (x *ArrayType) Pos() token.Pos + type BadExpr struct + From token.Pos + To token.Pos + func (x *BadExpr) End() token.Pos + func (x *BadExpr) Pos() token.Pos + type BadStmt struct + From token.Pos + To token.Pos + func (s *BadStmt) End() token.Pos + func (s *BadStmt) Pos() token.Pos + type BasicLit struct + Kind token.Token + Value string + ValuePos token.Pos + func (x *BasicLit) End() token.Pos + func (x *BasicLit) Pos() token.Pos + type BinaryExpr struct + Op token.Token + OpPos token.Pos + X Expr + Y Expr + func (x *BinaryExpr) End() token.Pos + func (x *BinaryExpr) Pos() token.Pos + type CallExpr struct + Args []Expr + Fun Expr + Lparen token.Pos + Rparen token.Pos + func (x *CallExpr) End() token.Pos + func (x *CallExpr) Pos() token.Pos + type Comment struct + Slash token.Pos + Text string + func (c *Comment) End() token.Pos + func (c *Comment) Pos() token.Pos + type CommentGroup struct + List []*Comment + func (g *CommentGroup) End() token.Pos + func (g *CommentGroup) Pos() token.Pos + func (g *CommentGroup) Text() string + func (g *CommentGroup) TrimComments() []string + type CommentMap map[Node][]*CommentGroup + func NewCommentMap(fset *token.FileSet, node Node, comments []*CommentGroup) CommentMap + func (cmap CommentMap) Comments() []*CommentGroup + func (cmap CommentMap) Filter(node Node) CommentMap + func (cmap CommentMap) String() string + func (cmap CommentMap) Update(old, new Node) Node + type ConstDecl = GenDecl[Expr] + type Decl interface + Token func() token.Token + type EnumDecl = GenDecl[*EnumType] + type EnumMember struct + Annotations *AnnotationGroup + AssignPos token.Pos + Comment *CommentGroup + Doc *CommentGroup + Name *Ident + Value Expr + func (m *EnumMember) End() token.Pos + func (m *EnumMember) Pos() token.Pos + type EnumType struct + Members *MemberList + func (x *EnumType) End() token.Pos + func (x *EnumType) Pos() token.Pos + type Expr interface + func Unparen(e Expr) Expr + type ExprStmt struct + X Expr + func (s *ExprStmt) End() token.Pos + func (s *ExprStmt) Pos() token.Pos + type FieldList = List[*StructField] + type File struct + Annotations *AnnotationGroup + Comments []*CommentGroup + Decls []Decl + Doc *CommentGroup + FileEnd token.Pos + FileStart token.Pos + Imports []*ImportDecl + Name *Ident + Package token.Pos + Stmts []Stmt + func (f *File) End() token.Pos + func (f *File) Pos() token.Pos + type GenDecl struct + Annotations *AnnotationGroup + Comment *CommentGroup + Doc *CommentGroup + Name *Ident + Spec T + Tok token.Token + TokPos token.Pos + func (s *GenDecl[T]) End() token.Pos + func (s *GenDecl[T]) Pos() token.Pos + func (x *GenDecl[T]) Token() token.Token + type Ident struct + Name string + NamePos token.Pos + func (id *Ident) String() string + func (x *Ident) End() token.Pos + func (x *Ident) Pos() token.Pos + type ImportDecl struct + Comment *CommentGroup + Doc *CommentGroup + EndPos token.Pos + ImportPos token.Pos + Path *BasicLit + func (s *ImportDecl) End() token.Pos + func (s *ImportDecl) Pos() token.Pos + func (x *ImportDecl) Token() token.Token + type InterfaceDecl = GenDecl[*InterfaceType] + type InterfaceType struct + Methods *MethodList + func (x *InterfaceType) End() token.Pos + func (x *InterfaceType) Pos() token.Pos + type List struct + Closing token.Pos + List []T + Opening token.Pos + func (l *List[T]) End() token.Pos + func (l *List[T]) NumFields() int + func (l *List[T]) Pos() token.Pos + type MapType struct + GT token.Pos + K Type + Map token.Pos + V Type + func (x *MapType) End() token.Pos + func (x *MapType) Pos() token.Pos + type MemberList = List[*EnumMember] + type Method struct + Annotations *AnnotationGroup + Comment *CommentGroup + Doc *CommentGroup + Name *Ident + Params *MethodParamList + Result Type + func (m *Method) End() token.Pos + func (m *Method) Pos() token.Pos + type MethodList = List[*Method] + type MethodParam struct + Annotations *AnnotationGroup + Comment *CommentGroup + Doc *CommentGroup + Name *Ident + Type Type + func (p *MethodParam) End() token.Pos + func (p *MethodParam) Pos() token.Pos + type MethodParamList = List[*MethodParam] + type Node interface + End func() token.Pos + Pos func() token.Pos + type ParenExpr struct + Lparen token.Pos + Rparen token.Pos + X Expr + func (x *ParenExpr) End() token.Pos + func (x *ParenExpr) Pos() token.Pos + type SelectorExpr struct + Sel *Ident + X Expr + func (x *SelectorExpr) End() token.Pos + func (x *SelectorExpr) Pos() token.Pos + type Stmt interface + type StructDecl = GenDecl[*StructType] + type StructField struct + Annotations *AnnotationGroup + Comment *CommentGroup + Doc *CommentGroup + Name *Ident + Type Type + func (f *StructField) End() token.Pos + func (f *StructField) Pos() token.Pos + type StructType struct + Fields *FieldList + func (x *StructType) End() token.Pos + func (x *StructType) Pos() token.Pos + type Type interface + type UnaryExpr struct + Op token.Token + OpPos token.Pos + X Expr + func (x *UnaryExpr) End() token.Pos + func (x *UnaryExpr) Pos() token.Pos + type VectorType struct + GT token.Pos + T Type + Vector token.Pos + func (x *VectorType) End() token.Pos + func (x *VectorType) Pos() token.Pos + type Visitor interface + Visit func(node Node) (w Visitor)