@specs-feup/clava
Version:
A C/C++ source-to-source compiler written in Typescript
22 lines (17 loc) • 466 B
text/typescript
import { GotoStmt } from "../../../../Joinpoints.js";
import CfgNodeData from "../CfgNodeData.js";
import CfgNodeType from "../CfgNodeType.js";
export default class GotoData extends CfgNodeData<GotoStmt> {
constructor($stmt?: GotoStmt, id?: string) {
super(CfgNodeType.GOTO, $stmt, id);
}
get goto() {
return this.nodeStmt;
}
toString() {
if (this.goto === undefined) {
return super.toString();
}
return this.goto.code;
}
}