Python: QL doc for Node

This commit is contained in:
Rasmus Lerchedahl Petersen
2020-11-03 11:13:58 +01:00
parent 2bb1917733
commit 6103dbcfff

View File

@@ -118,11 +118,13 @@ class Node extends TNode {
Node track(TypeTracker t2, TypeTracker t) { t = t2.step(this, result) }
}
/** A data-flow node corresponding to an SSA variable. */
class EssaNode extends Node, TEssaNode {
EssaVariable var;
EssaNode() { this = TEssaNode(var) }
/** Gets the `EssaVariable` represented by this data-flow node. */
EssaVariable getVar() { result = var }
override EssaVariable asVar() { result = var }
@@ -135,11 +137,13 @@ class EssaNode extends Node, TEssaNode {
override Location getLocation() { result = var.getDefinition().getLocation() }
}
/** A data-flow node corresponding to a control-flow node. */
class CfgNode extends Node, TCfgNode {
ControlFlowNode node;
CfgNode() { this = TCfgNode(node) }
/** Gets the `ControlFlowNode` represented by this data-flow node. */
ControlFlowNode getNode() { result = node }
override ControlFlowNode asCfgNode() { result = node }