deleteRightLeaf method

  1. @override
DartBlockValueTreeBooleanNode? deleteRightLeaf()
override

Implementation

@override
DartBlockValueTreeBooleanNode? deleteRightLeaf() {
  if (rightChild != null) {
    return rightChild?.deleteRightLeaf();
  } else if (operator == null && leftChild != null) {
    return leftChild!.deleteRightLeaf();
  } else {
    return parent?.replaceChild(this, null);
  }
}