Versions in this module Expand all Collapse all v0 v0.4.1 Aug 2, 2022 Changes in this version + func NodeToAST(node Node, state State) interface + type Any struct + func (Any) Match(m *Matcher, node interface{}) (interface{}, bool) + func (Any) String() string + type ArrayType struct + Elt Node + Len Node + func (typ ArrayType) String() string + type AssignStmt struct + Lhs Node + Rhs Node + Tok Node + func (stmt AssignStmt) String() string + type BasicLit struct + Kind Node + Value Node + func (lit BasicLit) String() string + type BinaryExpr struct + Op Node + X Node + Y Node + func (expr BinaryExpr) String() string + type Binding struct + Name string + Node Node + func (b Binding) Match(m *Matcher, node interface{}) (interface{}, bool) + func (bind Binding) String() string + type BranchStmt struct + Label Node + Tok Node + func (stmt BranchStmt) String() string + type Builtin struct + Name Node + func (builtin Builtin) Match(m *Matcher, node interface{}) (interface{}, bool) + func (builtin Builtin) String() string + type CallExpr struct + Args Node + Fun Node + func (expr CallExpr) String() string + type CaseClause struct + Body Node + List Node + func (clause CaseClause) String() string + type ChanType struct + Dir Node + Value Node + func (typ ChanType) String() string + type CommClause struct + Body Node + Comm Node + func (clause CommClause) String() string + type CompositeLit struct + Elts Node + Type Node + func (lit CompositeLit) String() string + type DeferStmt struct + Call Node + func (stmt DeferStmt) String() string + type Ellipsis struct + Elt Node + func (el Ellipsis) String() string + type EmptyStmt struct + func (stmt EmptyStmt) String() string + type Field struct + Names Node + Tag Node + Type Node + func (field Field) String() string + type ForStmt struct + Body Node + Cond Node + Init Node + Post Node + func (stmt ForStmt) String() string + type FuncDecl struct + Body Node + Name Node + Recv Node + Type Node + func (decl FuncDecl) String() string + type FuncLit struct + Body Node + Type Node + func (lit FuncLit) String() string + type FuncType struct + Params Node + Results Node + func (typ FuncType) String() string + type GenDecl struct + Specs Node + Tok Node + func (decl GenDecl) String() string + type GoStmt struct + Call Node + func (stmt GoStmt) String() string + type Ident struct + Name Node + func (id Ident) String() string + type IfStmt struct + Body Node + Cond Node + Else Node + Init Node + func (stmt IfStmt) String() string + type ImportSpec struct + Name Node + Path Node + func (spec ImportSpec) String() string + type IncDecStmt struct + Tok Node + X Node + func (stmt IncDecStmt) String() string + type IndexExpr struct + Index Node + X Node + func (expr IndexExpr) String() string + type IndexListExpr struct + Indices Node + X Node + func (expr IndexListExpr) String() string + type IntegerLiteral struct + Value Node + func (lit IntegerLiteral) Match(m *Matcher, node interface{}) (interface{}, bool) + func (lit IntegerLiteral) String() string + type InterfaceType struct + Methods Node + func (typ InterfaceType) String() string + type KeyValueExpr struct + Key Node + Value Node + func (expr KeyValueExpr) String() string + type List struct + Head Node + Tail Node + func (l List) Match(m *Matcher, node interface{}) (interface{}, bool) + func (l List) String() string + type MapType struct + Key Node + Value Node + func (typ MapType) String() string + type Matcher struct + State State + TypesInfo *types.Info + func Match(a Pattern, b ast.Node) (*Matcher, bool) + func (m *Matcher) Match(a Pattern, b ast.Node) bool + type Nil struct + func (Nil) Match(m *Matcher, node interface{}) (interface{}, bool) + func (nil Nil) String() string + type Node interface + String func() string + func ASTToNode(node interface{}) Node + type Not struct + Node Node + func (not Not) Match(m *Matcher, node interface{}) (interface{}, bool) + func (not Not) String() string + type Object struct + Name Node + func (obj Object) Match(m *Matcher, node interface{}) (interface{}, bool) + func (obj Object) String() string + type Or struct + Nodes []Node + func (or Or) Match(m *Matcher, node interface{}) (interface{}, bool) + func (or Or) String() string + type Parser struct + AllowTypeInfo bool + func (p *Parser) Parse(s string) (Pattern, error) + type Pattern struct + Bindings []string + Relevant map[reflect.Type]struct{} + Root Node + func MustParse(s string) Pattern + type RangeStmt struct + Body Node + Key Node + Tok Node + Value Node + X Node + func (stmt RangeStmt) String() string + type ReturnStmt struct + Results Node + func (stmt ReturnStmt) String() string + type SelectStmt struct + Body Node + func (stmt SelectStmt) String() string + type SelectorExpr struct + Sel Node + X Node + func (expr SelectorExpr) String() string + type SendStmt struct + Chan Node + Value Node + func (stmt SendStmt) String() string + type SliceExpr struct + High Node + Low Node + Max Node + X Node + func (expr SliceExpr) String() string + type StarExpr struct + X Node + func (expr StarExpr) String() string + type State = map[string]any + type String string + func (s String) Match(m *Matcher, node interface{}) (interface{}, bool) + func (s String) String() string + type StructType struct + Fields Node + func (typ StructType) String() string + type SwitchStmt struct + Body Node + Init Node + Tag Node + func (stmt SwitchStmt) String() string + type Symbol struct + Name Node + func (fn Symbol) Match(m *Matcher, node interface{}) (interface{}, bool) + func (fn Symbol) String() string + type Token token.Token + func (tok Token) Match(m *Matcher, node interface{}) (interface{}, bool) + func (tok Token) String() string + type TrulyConstantExpression struct + Value Node + func (expr TrulyConstantExpression) String() string + func (texpr TrulyConstantExpression) Match(m *Matcher, node interface{}) (interface{}, bool) + type TypeAssertExpr struct + Type Node + X Node + func (expr TypeAssertExpr) String() string + type TypeSpec struct + Name Node + Type Node + func (spec TypeSpec) String() string + type TypeSwitchStmt struct + Assign Node + Body Node + Init Node + func (stmt TypeSwitchStmt) String() string + type UnaryExpr struct + Op Node + X Node + func (expr UnaryExpr) String() string + type ValueSpec struct + Names Node + Type Node + Values Node + func (spec ValueSpec) String() string