@specs-feup/clava
Version:
A C/C++ source-to-source compiler written in Typescript
28 lines • 760 B
TypeScript
import { ExprStmt } from "../../Joinpoints.js";
/**
* Simplifies a statement like:
*
* ```c
* x = y ? a : b;
* ```
*
* Into:
*
* ```c
* if (y) {
* x = a;
* } else {
* x = b;
* }
* ```
*
* $assignmentStmt must be an expression statement (not an inline expression, such as in a
* varDecl or within another expression). The expression statement must only contain an assignment
* operator, and the rvalue must be a ternary operator.
*
* Otherwise the function will immediately return.
*
* @param $assignmentStmt - Expression statement containing an assignment where the right hand side is a ternary operator
*/
export default function SimplifyTernaryOp($assignmentStmt: ExprStmt): void;
//# sourceMappingURL=SimplifyTernaryOp.d.ts.map