[compiler][ez] PrintHIR prints optional flag for debugging

Adding the equivalent of [PrintReactiveFunction:OptionalExpression](https://github.com/facebook/react/blob/f5d2feb4f069a36140d5e605f5eebc52badcc214/compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/PrintReactiveFunction.ts#L218) to `PrintHIR`.

ghstack-source-id: 5b175f6f62
Pull Request resolved: https://github.com/facebook/react/pull/30078
This commit is contained in:
Mofei Zhang
2024-06-25 17:00:14 -04:00
parent 4bfab07832
commit d878489431
@@ -194,7 +194,7 @@ export function printTerminal(terminal: Terminal): Array<string> | string {
break;
}
case "optional": {
value = `[${terminal.id}] Optional test:bb${terminal.test} fallthrough=bb${terminal.fallthrough}`;
value = `[${terminal.id}] Optional (optional=${terminal.optional}) test:bb${terminal.test} fallthrough=bb${terminal.fallthrough}`;
break;
}
case "throw": {