ancestorCascade property

CascadeExpressionImpl? ancestorCascade

Return the cascade that contains this SimpleIdentifier.

Implementation

CascadeExpressionImpl? get ancestorCascade {
  var operatorType = token.previous?.type;
  if (operatorType == TokenType.PERIOD_PERIOD ||
      operatorType == TokenType.QUESTION_PERIOD_PERIOD) {
    return thisOrAncestorOfType<CascadeExpressionImpl>();
  }
  return null;
}