pub enum EdgeType {
Show 25 variants
UnknownEdgeType = 0,
Ast = 3,
Call = 6,
Ref = 10,
TaggedBy = 11,
ParameterLink = 12,
Cfg = 19,
EvalType = 21,
BindsTo = 22,
InheritsFrom = 23,
Contains = 28,
Capture = 40,
CapturedBy = 41,
Receiver = 55,
Condition = 56,
ReachingDef = 137,
AliasOf = 138,
Binds = 155,
Argument = 156,
SourceFile = 157,
Dominate = 181,
PostDominate = 182,
Cdg = 183,
Imports = 23_663,
IsCallForImport = 23_664,
}
Variants§
UnknownEdgeType = 0
Ast = 3
This edge connects a parent node to its child in the syntax tree.
Call = 6
This edge connects call sites, i.e., nodes with the type CALL
, to the
method node that represent the method they invoke. The frontend MAY create
CALL
edges but is not required to do so. Instead, of the METHOD_FULL_NAME
field of the CALL
node is set correctly, CALL
edges are created
automatically as the CPG is first loaded.
Ref = 10
This edge indicates that the source node is an identifier that denotes access to the destination node. For example, an identifier may reference a local variable.
TaggedBy = 11
Edges from nodes to the tags they are tagged by.
ParameterLink = 12
This edge connects a method input parameter to the corresponding method output parameter.
Cfg = 19
This edge indicates control flow from the source to the destination node.
EvalType = 21
This edge connects a node to its evaluation type.
BindsTo = 22
This edge connects type arguments to type parameters to indicate that the type argument is used to instantiate the type parameter.
InheritsFrom = 23
Inheritance relation between a type declaration and a type. This edge MUST NOT
be created by the language frontend as it is automatically created from
INHERITS_FROM_TYPE_FULL_NAME
fields then the CPG is first loaded.
Contains = 28
This edge connects a node to the method that contains it.
Capture = 40
Represents the capturing of a variable into a closure
CapturedBy = 41
Connection between a captured LOCAL and the corresponding CLOSURE_BINDING
Receiver = 55
Similar to ARGUMENT
edges, RECEIVER
edges connect call sites
to their receiver arguments. A receiver argument is the object on
which a method operates, that is, it is the expression that is
assigned to the this
pointer as control is transferred to the method.
Condition = 56
The edge connects control structure nodes to the expressions that holds their conditions.
ReachingDef = 137
A reaching definition edge indicates that a variable produced at the source node reaches
the destination node without being reassigned on the way. The VARIABLE
property indicates
which variable is propagated.
AliasOf = 138
This edge represents an alias relation between a type declaration and a type.
The language frontend MUST NOT create ALIAS_OF
edges as they are created
automatically based on ALIAS_TYPE_FULL_NAME
fields when the CPG is first loaded.
Binds = 155
This edge connects a type declaration (TYPE_DECL
) with a binding node (BINDING
) and
indicates that the type declaration has the binding represented by the binding node, in
other words, there is a (name, signature) pair that can be resolved for the type
declaration as stored in the binding node.
Argument = 156
Argument edges connect call sites (node type CALL
) to their arguments
(node type EXPRESSION
) as well as RETURN
nodes to the expressions
that return.
SourceFile = 157
This edge connects a node to the node that represents its source file. These
edges MUST not be created by the language frontend but are automatically
created based on FILENAME
fields.
Dominate = 181
This edge indicates that the source node immediately dominates the destination node.
PostDominate = 182
This edge indicates that the source node immediately post dominates the destination node.
Cdg = 183
A CDG edge expresses that the destination node is control dependent on the source node.
Imports = 23_663
Edge from imports to dependencies
IsCallForImport = 23_664
Edge from CALL statement in the AST to the IMPORT.  |We use this edge to traverse from the logical representation of the IMPORT  |to the corresponding import statement in the AST.  |