unParenthesized property

  1. @override
ExpressionImpl unParenthesized
override

If this expression is a parenthesized expression, return the result of unwrapping the expression inside the parentheses. Otherwise, return this expression.

Implementation

@override
ExpressionImpl get unParenthesized {
  // This is somewhat inefficient, but it avoids a stack overflow in the
  // degenerate case.
  var expression = _expression;
  while (expression is ParenthesizedExpressionImpl) {
    expression = expression._expression;
  }
  return expression;
}