computedValue property

  1. @override
double get computedValue
override

Implementation

@override
double get computedValue {
  if (operator == TokenKind.PLUS) {
    return leftNode.computedValue + rightNode.computedValue;
  }
  if (operator == TokenKind.ASTERISK) {
    return leftNode.computedValue * rightNode.computedValue;
  }
  assert(false, 'This operator should not be used');
  return 0;
}