ControlFlowNode

/*
* This class represent control flow node, all ast nodes are
* control flow nodes.
*/

Primary key: id: int

schema ControlFlowNode {
  @primary id: int
}

ControlFlowNode::getPredecessorCount

/**
* Get the count of immediate predecessor nodes/
*/
pub fn getPredecessorCount(self: ControlFlowNode) -> int;

ControlFlowNode::getSuccessorCount

/**
* Get the count of immediate successor nodes.
*/
pub fn getSuccessorCount(self: ControlFlowNode) -> int;

ControlFlowNode::getBasicBlock

/**
* Get the basic block that contains this node.
*/
pub fn getBasicBlock(self: ControlFlowNode) -> BasicBlock;

ControlFlowNode::getAPredecessor

/**
* Get an immediate predecessor of this node.
*/
pub fn getAPredecessor(self: ControlFlowNode) -> *ControlFlowNode;

ControlFlowNode::getASuccessorRecursive

/**
* Gets the successor of this node, and query successors recursively
*/
pub fn getASuccessorRecursive(self: ControlFlowNode) -> *ControlFlowNode;

ControlFlowNode::getASuccessor

/**
* Get an immediate successor of this node.
*/
pub fn getASuccessor(self: ControlFlowNode) -> *ControlFlowNode;

ControlFlowNode::isExitNode

pub fn isExitNode(self: ControlFlowNode) -> bool;

ControlFlowNode::isAstNode

pub fn isAstNode(self: ControlFlowNode) -> bool;

ControlFlowNode::isEntryNode

pub fn isEntryNode(self: ControlFlowNode) -> bool;

ControlFlowNode::getText

/**
* Get the text of this control flow node.
*/
pub fn getText(self: ControlFlowNode) -> string;

ControlFlowNode::getASuccessorWithCompletion

/**
* Get an immediate successor of this node with the given
* type of Completion.
*/
pub fn getASuccessorWithCompletion(self: ControlFlowNode, c: Completion) -> *ControlFlowNode;

ControlFlowNode::isSyntheticNode

pub fn isSyntheticNode(self: ControlFlowNode) -> bool;

ControlFlowNode::getEnclosingFunction

/**
* Get the enclosing function of node.
* CfgEntryNode or CfgExitNode return belongs to function.
*/
pub fn getEnclosingFunction(self: ControlFlowNode) -> FunctionLikeDeclaration;

ControlFlowNode::__all__

Data constraint method.

pub fn __all__(db: JavascriptDB) -> *ControlFlowNode;

ControlFlowNode::getLocation

/**
* Get the location of this control flow node.
*/
pub fn getLocation(self: ControlFlowNode) -> Location;

ControlFlowNode::getFile

/**
* Get the file of this control flow node.
*/
pub fn getFile(self: ControlFlowNode) -> File;

ControlFlowNode::getKindName

/**
* Get the kind name of node.
* If node is ast node, just return ast node kind name; otherwise
* return node name as CfgEntryNode or CfgExitNode.
*/
pub fn getKindName(self: ControlFlowNode) -> string;

ControlFlowNode::getRelativePath

/**
* Get the relative path of this control flow node.
*/
pub fn getRelativePath(self: ControlFlowNode) -> string;