@syntest/cfg
Version:
A Control Flow Graph package
37 lines • 1.02 kB
TypeScript
import { NodeType } from "./NodeType";
/**
* Represents a basic block in a control flow graph.
*/
export declare class Node {
readonly id: string;
readonly type: NodeType;
readonly label: string;
readonly description?: string;
/**
* The ordered list of statements in this node.
*/
readonly statements: Statement[];
readonly metadata: MetaData;
constructor(id: string, type: NodeType, label: string, statements: Statement[], metadata: MetaData, description?: string);
}
export type MetaData = {
readonly [key: string]: unknown;
};
export interface Location {
readonly start: {
readonly line: number;
readonly column: number;
readonly index: number;
};
readonly end: {
readonly line: number;
readonly column: number;
readonly index: number;
};
}
export interface Statement {
readonly id: string;
readonly location: Location;
readonly statementAsText: string;
}
//# sourceMappingURL=Node.d.ts.map