Documentation
¶
Index ¶
- Variables
- func SymbolName(symType SymbolType) string
- type ASTGetter
- type ArrayType
- type BasicLit
- type BinaryExpr
- type CallExpr
- type ChanType
- type CodeFacet
- type Collector
- func (c *Collector) CollectArrayType(ctx context.Context, aat *ast.ArrayType) (at ArrayType, err error)
- func (c *Collector) CollectBasicLit(ctx context.Context, e *ast.BasicLit) (BasicLit, error)
- func (c *Collector) CollectBinaryExpr(ctx context.Context, abe *ast.BinaryExpr) (be BinaryExpr, err error)
- func (c *Collector) CollectCallExpr(ctx context.Context, call *ast.CallExpr) (ce CallExpr, err error)
- func (c *Collector) CollectChanType(ctx context.Context, act *ast.ChanType) (ct ChanType, err error)
- func (c *Collector) CollectCompositeLit(ctx context.Context, acl *ast.CompositeLit) (cl CompositeLit, err error)
- func (c *Collector) CollectConst(ctx context.Context, d *ast.GenDecl) (err error)
- func (c *Collector) CollectEllipsis(ctx context.Context, ae *ast.Ellipsis) (e Ellipsis, err error)
- func (c *Collector) CollectExpr(ctx context.Context, expr ast.Expr) (e Expr, err error)
- func (c *Collector) CollectExprSlice(ctx context.Context, astExprs []ast.Expr) (el ExprList, err error)
- func (c *Collector) CollectExprString(ctx context.Context, ae ast.Expr) (s string, err error)
- func (c *Collector) CollectFacets(ctx context.Context) (err error)
- func (c *Collector) CollectField(ctx context.Context, aFld *ast.Field) (list FieldList, err error)
- func (c *Collector) CollectFieldList(ctx context.Context, list *ast.FieldList) (FieldList, error)
- func (c *Collector) CollectFieldSlice(ctx context.Context, list []*ast.Field) (fl FieldList, err error)
- func (c *Collector) CollectFuncDecl(ctx context.Context, fd *ast.FuncDecl) (err error)
- func (c *Collector) CollectFuncLit(ctx context.Context, fl *ast.FuncLit) (_ FuncLit, err error)
- func (c *Collector) CollectFuncType(ctx context.Context, aft *ast.FuncType) (ft FuncType, err error)
- func (c *Collector) CollectGenDecl(ctx context.Context, d *ast.GenDecl) (err error)
- func (c *Collector) CollectIdent(ctx context.Context, e *ast.Ident) (Ident, error)
- func (c *Collector) CollectIdentSlice(ctx context.Context, astExprs []ast.Expr) (is Idents, err error)
- func (c *Collector) CollectImportSpec(ctx context.Context, ais *ast.ImportSpec) (is ImportSpec)
- func (c *Collector) CollectIndexExpr(ctx context.Context, aie *ast.IndexExpr) (ie IndexExpr, err error)
- func (c *Collector) CollectIndexListExpr(ctx context.Context, aile *ast.IndexListExpr) (ile IndexListExpr, err error)
- func (c *Collector) CollectInterfaceType(ctx context.Context, iface *ast.InterfaceType) (it InterfaceType, err error)
- func (c *Collector) CollectKeyValueExpr(ctx context.Context, e *ast.KeyValueExpr) (kve KeyValueExpr, err error)
- func (c *Collector) CollectMapType(ctx context.Context, amt *ast.MapType) (mt MapType, err error)
- func (c *Collector) CollectParenExpr(ctx context.Context, ape *ast.ParenExpr) (pe ParenExpr, err error)
- func (c *Collector) CollectReceiver(ctx context.Context, list *ast.FieldList) (fld *Field, cnt int, err error)
- func (c *Collector) CollectSelectorExpr(ctx context.Context, e *ast.SelectorExpr) (se SelectorExpr, err error)
- func (c *Collector) CollectSliceExpr(ctx context.Context, ase *ast.SliceExpr) (se SliceExpr, err error)
- func (c *Collector) CollectSpec(ctx context.Context, spec ast.Spec, typ *Expr) (err error)
- func (c *Collector) CollectStarExpr(ctx context.Context, ase *ast.StarExpr) (se StarExpr, err error)
- func (c *Collector) CollectStructType(ctx context.Context, t *ast.StructType) (st StructType, err error)
- func (c *Collector) CollectTypeAssertExpr(ctx context.Context, atae *ast.TypeAssertExpr) (tae TypeAssertExpr, err error)
- func (c *Collector) CollectTypeSpec(ctx context.Context, ats *ast.TypeSpec) (ts *TypeSpec, err error)
- func (c *Collector) CollectUnaryExpr(ctx context.Context, aue *ast.UnaryExpr) (ue UnaryExpr, err error)
- func (c *Collector) CollectValueSpec(ctx context.Context, avs *ast.ValueSpec, typ *Expr) (vs ValueSpecs, err error)
- func (c *Collector) CollectVar(ctx context.Context, d *ast.GenDecl) (err error)
- type CompositeLit
- type Direction
- type Ellipsis
- type Expr
- type ExprList
- type Field
- type FieldList
- type File
- type FuncDecl
- type FuncLit
- type FuncType
- type Ident
- type Idents
- type ImportSpec
- type IndexExpr
- type IndexListExpr
- type InterfaceType
- type KeyValueExpr
- type MapType
- type Operator
- type ParenExpr
- type SelectorExpr
- type SliceExpr
- type StarExpr
- type String
- type StructType
- type SymbolType
- type TypeAssertExpr
- type TypeSpec
- type UnaryExpr
- type ValueSpec
- type ValueSpecs
- type ValueType
Constants ¶
This section is empty.
Variables ¶
View Source
var SymbolTypeMap = map[string]SymbolType{}
View Source
var SymbolTypes = []SymbolType{ UnclassifiedSymbol, IdentifierSymbol, InterfaceSymbol, FuncSymbol, StructSymbol, ExprSymbol, LiteralSymbol, }
Functions ¶
func SymbolName ¶
func SymbolName(symType SymbolType) string
Types ¶
type BinaryExpr ¶
func (BinaryExpr) String ¶
func (e BinaryExpr) String() string
type Collector ¶
type Collector struct { File File FacetChan chan CodeFacet // replace FuncDecl with the actual type you intend to use }
func (*Collector) CollectArrayType ¶
func (*Collector) CollectBasicLit ¶
func (*Collector) CollectBinaryExpr ¶
func (c *Collector) CollectBinaryExpr(ctx context.Context, abe *ast.BinaryExpr) (be BinaryExpr, err error)
func (*Collector) CollectCallExpr ¶
func (*Collector) CollectChanType ¶
func (*Collector) CollectCompositeLit ¶
func (c *Collector) CollectCompositeLit(ctx context.Context, acl *ast.CompositeLit) (cl CompositeLit, err error)
func (*Collector) CollectConst ¶
func (*Collector) CollectEllipsis ¶
func (*Collector) CollectExpr ¶
func (*Collector) CollectExprSlice ¶
func (*Collector) CollectExprString ¶
func (*Collector) CollectFacets ¶
func (*Collector) CollectField ¶
func (*Collector) CollectFieldList ¶
func (*Collector) CollectFieldSlice ¶
func (*Collector) CollectFuncDecl ¶
func (*Collector) CollectFuncLit ¶
func (*Collector) CollectFuncType ¶
func (*Collector) CollectGenDecl ¶
func (*Collector) CollectIdent ¶
func (*Collector) CollectIdentSlice ¶
func (*Collector) CollectImportSpec ¶
func (c *Collector) CollectImportSpec(ctx context.Context, ais *ast.ImportSpec) (is ImportSpec)
func (*Collector) CollectIndexExpr ¶
func (*Collector) CollectIndexListExpr ¶
func (c *Collector) CollectIndexListExpr(ctx context.Context, aile *ast.IndexListExpr) (ile IndexListExpr, err error)
func (*Collector) CollectInterfaceType ¶
func (c *Collector) CollectInterfaceType(ctx context.Context, iface *ast.InterfaceType) (it InterfaceType, err error)
func (*Collector) CollectKeyValueExpr ¶
func (c *Collector) CollectKeyValueExpr(ctx context.Context, e *ast.KeyValueExpr) (kve KeyValueExpr, err error)
func (*Collector) CollectMapType ¶
func (*Collector) CollectParenExpr ¶
func (*Collector) CollectReceiver ¶
func (*Collector) CollectSelectorExpr ¶
func (c *Collector) CollectSelectorExpr(ctx context.Context, e *ast.SelectorExpr) (se SelectorExpr, err error)
func (*Collector) CollectSliceExpr ¶
func (*Collector) CollectSpec ¶
func (*Collector) CollectStarExpr ¶
func (*Collector) CollectStructType ¶
func (c *Collector) CollectStructType(ctx context.Context, t *ast.StructType) (st StructType, err error)
func (*Collector) CollectTypeAssertExpr ¶
func (c *Collector) CollectTypeAssertExpr(ctx context.Context, atae *ast.TypeAssertExpr) (tae TypeAssertExpr, err error)
func (*Collector) CollectTypeSpec ¶
func (*Collector) CollectUnaryExpr ¶
func (*Collector) CollectValueSpec ¶
type CompositeLit ¶
func (CompositeLit) String ¶
func (e CompositeLit) String() (s string)
type ImportSpec ¶
func (ImportSpec) CodeFacet ¶
func (is ImportSpec) CodeFacet()
func (ImportSpec) Name ¶
func (is ImportSpec) Name() string
func (ImportSpec) String ¶
func (is ImportSpec) String() (s string)
type IndexListExpr ¶
func (IndexListExpr) String ¶
func (e IndexListExpr) String() (s string)
type InterfaceType ¶
type InterfaceType struct {
Methods FieldList
}
func (InterfaceType) String ¶
func (e InterfaceType) String() (s string)
type KeyValueExpr ¶
func (KeyValueExpr) String ¶
func (e KeyValueExpr) String() string
type SelectorExpr ¶
func (SelectorExpr) String ¶
func (se SelectorExpr) String() string
type StructType ¶
type StructType struct {
Fields FieldList
}
func (StructType) String ¶
func (e StructType) String() (s string)
type SymbolType ¶
type SymbolType int
const ( UnclassifiedSymbol SymbolType = 0 StructSymbol SymbolType = 1 InterfaceSymbol SymbolType = 2 IdentifierSymbol SymbolType = 3 FuncSymbol SymbolType = 4 ExprSymbol SymbolType = 5 LiteralSymbol SymbolType = 6 )
func SymbolTypeFromExpr ¶
func SymbolTypeFromExpr(expr Expr) (st SymbolType)
func (SymbolType) ID ¶
func (st SymbolType) ID() int
func (SymbolType) Name ¶
func (st SymbolType) Name() string
type TypeAssertExpr ¶
func (TypeAssertExpr) String ¶
func (e TypeAssertExpr) String() (s string)
type TypeSpec ¶
type TypeSpec struct { File File Name string Definition Expr SymbolType SymbolType }
type ValueSpecs ¶
type ValueSpecs []ValueSpec
Source Files
¶
- array_type.go
- basic_lit.go
- binary_expr.go
- call_expr.go
- chan_type.go
- collector.go
- composit_lit.go
- direction.go
- ellipsis_expr.go
- expr.go
- field.go
- func_decl.go
- func_lit.go
- func_type.go
- gen_decl.go
- ident.go
- import_spec.go
- index_expr.go
- index_list_expr.go
- interface_type.go
- interfaces.go
- key_value_expr.go
- map_type.go
- operator.go
- paren_expr.go
- selector_expr.go
- slice_expr.go
- star_expr.go
- string.go
- stringers.go
- struct_type.go
- symbol_type.go
- type_assert_expr.go
- type_spec.go
- unary_expr.go
- util.go
- value_spec.go
- value_type.go
Click to show internal directories.
Click to hide internal directories.