BinaryOperator constructor

BinaryOperator(
  1. dynamic first,
  2. dynamic second
)

Creates a BinaryOperator from two given arguments.

If an argument is not an expression, it will be wrapped in an appropriate literal.

  • A (positive) number will be encapsulated in a Number Literal,
  • A string will be encapsulated in a Variable Literal.

Implementation

BinaryOperator(dynamic first, dynamic second) {
  this.first = _toExpression(first);
  this.second = _toExpression(second);
}