@specs-feup/clava
Version:
A C/C++ source-to-source compiler written in Typescript
45 lines • 1.44 kB
TypeScript
import NodeData from "@specs-feup/lara/api/lara/graphs/NodeData.js";
import { Statement } from "../../../Joinpoints.js";
import CfgNodeType from "./CfgNodeType.js";
/**
* The data of a CFG node.
*/
export default class CfgNodeData<T extends Statement = Statement> extends NodeData {
/**
* The statement join point of the CFG node
*/
nodeStmt: T | undefined;
protected nodeType: CfgNodeType;
protected nodeName: string | undefined;
/**
* Creates a new instance of the CfgNodeData class
* @param cfgNodeType - Node type
* @param $stmt - Statement that originated this CFG node
* @param id - Identification of the CFG node
*/
constructor(cfgNodeType: CfgNodeType, $stmt?: T, id?: string | undefined);
/**
* @returns The CFG node type
*/
get type(): CfgNodeType;
/**
* @returns The CFG node name
*/
get name(): string;
/**
* @returns The statements associated with this CFG node.
*/
get stmts(): T[];
/**
*
* @returns String representation of the CFG node
*/
toString(): string;
/**
*
* @returns True if this is a branch node, false otherwise. If this is a branch node, contains two edges, true and false.
* If not, contains only one uncoditional edge (expect if it is the end node, which contains no edges).
*/
isBranch(): boolean;
}
//# sourceMappingURL=CfgNodeData.d.ts.map