receiveConstant method

  1. @override
DartBlockValueTreeBooleanNode receiveConstant(
  1. bool constant
)
override

Implementation

@override
DartBlockValueTreeBooleanNode receiveConstant(bool constant) {
  if (leftChild == null) {
    leftChild = DartBlockValueTreeBooleanConstantNode.init(constant, this);
  } else if (rightChild == null && operator != null) {
    rightChild = DartBlockValueTreeBooleanConstantNode.init(constant, this);
  } else if (rightChild != null) {
    rightChild!.receiveConstant(constant);
  } else {
    leftChild!.receiveConstant(constant);
  }

  return this;
}