MCPcopy Create free account
hub / github.com/angular/angular / wrapInParensIfNecessary

Function wrapInParensIfNecessary

packages/localize/tools/src/source_file_utils.ts:263–269  ·  view source on GitHub ↗
(expression: t.Expression)

Source from the content-addressed store, hash-verified

261 * @param expression The expression to potentially wrap.
262 */
263export function wrapInParensIfNecessary(expression: t.Expression): t.Expression {
264 if (t.isBinaryExpression(expression)) {
265 return t.parenthesizedExpression(expression);
266 } else {
267 return expression;
268 }
269}
270
271/**
272 * Extract the string values from an `array` of string literals.

Callers 2

buildLocalizeReplacementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected