Documentation ¶
Index ¶
- func CollectNodesInTrueBranches(node parser.Node, typ []parser.NodeType, vars map[string]interface{}, ...) []parser.Node
- func GetName(node parser.Node) string
- func GetNodeNames(node parser.Node) []string
- func GetParent(ctx *walk.VisitorCtx, targetTyp, barrierTyp []parser.NodeType) (parser.Node, *walk.VisitorCtx)
- func GetStaticPropertyName(node parser.Node) string
- func GetVarDec(name string, varDecStmt *parser.VarDecStmt) *parser.VarDec
- func IdOfLocalInImportDec(local string, n *parser.ImportDec) string
- func IsFn(node parser.Node) bool
- func IsFnDepsOnNode(graph *FnDepGraph, fn parser.Node, target parser.Node) bool
- func IsIdentBoundInImportDec(ident *parser.Ident, scope *parser.Scope) *parser.ImportDec
- func IsNodeContains(parent, sub parser.Node) bool
- func IsPlainArr(node parser.Node) bool
- func IsPlainObj(node parser.Node) bool
- func IsPlainObjLit(node parser.Node) bool
- func IsPrimitive(node parser.Node) bool
- func NamesInDecNode(node parser.Node) (ret []string, all bool)
- func SelectTrueBranches(node parser.Node, vars map[string]interface{}, p *parser.Parser) []parser.Node
- type FnDepGraph
- type FnDepNode
- type SwitchBranch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectNodesInTrueBranches ¶
func CollectNodesInTrueBranches(node parser.Node, typ []parser.NodeType, vars map[string]interface{}, p *parser.Parser) []parser.Node
the minimal unit of the target nodes is expr
func GetNodeNames ¶ added in v0.0.11
func GetParent ¶
func GetParent(ctx *walk.VisitorCtx, targetTyp, barrierTyp []parser.NodeType) (parser.Node, *walk.VisitorCtx)
func GetStaticPropertyName ¶
func GetVarDec ¶ added in v0.0.13
func GetVarDec(name string, varDecStmt *parser.VarDecStmt) *parser.VarDec
func IdOfLocalInImportDec ¶ added in v0.0.13
func IsFnDepsOnNode ¶ added in v0.0.13
func IsIdentBoundInImportDec ¶ added in v0.0.13
func IsNodeContains ¶
func IsPlainArr ¶ added in v0.0.11
func IsPlainObj ¶ added in v0.0.11
func IsPlainObjLit ¶ added in v0.0.11
func IsPrimitive ¶ added in v0.0.11
func NamesInDecNode ¶ added in v0.0.11
Types ¶
type FnDepGraph ¶ added in v0.0.13
func BuildFnDepGraph ¶ added in v0.0.13
func BuildFnDepGraph(node parser.Node, symtab *parser.SymTab) *FnDepGraph
type SwitchBranch ¶
type SwitchBranch struct {
// contains filtered or unexported fields
}
func BinExprToSwitchBranch ¶
func BinExprToSwitchBranch(node *parser.BinExpr) []*SwitchBranch
func CondExprToSwitchBranches ¶
func CondExprToSwitchBranches(node *parser.CondExpr) []*SwitchBranch
func IfStmtToSwitchBranches ¶
func IfStmtToSwitchBranches(node *parser.IfStmt) []*SwitchBranch
func NodeToSwitchBranches ¶
func NodeToSwitchBranches(node parser.Node) []*SwitchBranch
Click to show internal directories.
Click to hide internal directories.