Documentation
¶
Index ¶
- Constants
- type ConstDeps
- type Decl
- func NewDecl(kind Kind, name string, node ast.Node, pos token.Pos, deps []string) *Decl
- func NewDeclExpr(node ast.Expr, counter *int) *Decl
- func NewDeclFunc(kind Kind, name string, node *ast.FuncDecl, deps []string) *Decl
- func NewDeclImport(spec ast.Spec, counter *int) *Decl
- func NewDeclPackage(spec ast.Spec, counter *int) *Decl
- func NewDeclStmt(node ast.Stmt, counter *int) *Decl
- func NewDeclType(node *ast.TypeSpec, deps []string) *Decl
- func NewDeclVar(ident *ast.Ident, node ast.Spec, typ ast.Expr, value ast.Expr, deps []string) *Decl
- func NewDeclVarMulti(ident *ast.Ident, node *ast.ValueSpec, deps []string) *Decl
- type DeclList
- type DeclMap
- type Extra
- type Kind
- type Scope
- func (s *Scope) Ast(form ast2.Ast) []string
- func (s *Scope) AstExpr(in ast2.Ast) []string
- func (s *Scope) Const(ident *ast.Ident, node ast.Spec, iota int, typ ast.Expr, value ast.Expr, ...) *Decl
- func (s *Scope) Consts(node ast.Spec, iota int, defaults *ConstDeps) []string
- func (s *Scope) Decl(node ast.Node) []string
- func (s *Scope) Expr(node ast.Node) []string
- func (s *Scope) Exprs(list []ast.Expr) [][]string
- func (s *Scope) File(node *ast.File) []string
- func (s *Scope) Func(node *ast.FuncDecl) []string
- func (s *Scope) GenDecl(node *ast.GenDecl) []string
- func (s *Scope) Import(node ast.Spec)
- func (s *Scope) Node(node ast.Node) []string
- func (s *Scope) Nodes(nodes []ast.Node)
- func (s *Scope) Package(node ast.Spec)
- func (s *Scope) Type(node ast.Spec) []string
- func (s *Scope) Var(ident *ast.Ident, node ast.Spec, typ ast.Expr, value ast.Expr, deps []string) *Decl
- func (s *Scope) Vars(node ast.Spec) []string
- type Sorter
Constants ¶
View Source
const DEBUG_GRAPH = false
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decl ¶
type Decl struct { Kind Kind Name string Node ast.Node // nil for multiple const or var declarations in a single *ast.ValueSpec - in such case, see Extra Deps []string // names of types, constants and variables used in Node's declaration Pos token.Pos Extra *Extra }
func NewDeclFunc ¶
func NewDeclVar ¶
func NewDeclVarMulti ¶
func (*Decl) RemoveUnresolvableDeps ¶
remove all dependencies that cannot be resolved, i.e. not present among m
type DeclMap ¶
func (DeclMap) RemoveUnresolvableDeps ¶
func (m DeclMap) RemoveUnresolvableDeps()
remove all dependencies that cannot be resolved, i.e. not present among m
type Extra ¶
type Extra struct { Ident *ast.Ident Type ast.Expr Value ast.Expr Iota int // for constants, value of iota to use }
for multiple const or var declarations in a single *ast.ValueSpec
type Scope ¶
func (*Scope) Const ¶
func (s *Scope) Const(ident *ast.Ident, node ast.Spec, iota int, typ ast.Expr, value ast.Expr, deps []string) *Decl
constant
Click to show internal directories.
Click to hide internal directories.