code: function makeTree(left, ops, rights, minPrecedence = 0) {
    while (ops.length > 0 && precedence[ops[0]] >= minPrecedence) {
      let op = ops.shift();
      let right = rights.shift();
      while (ops.length > 0 && (precedence[ops[0]] > precedence[op] ||
          associativity[ops[0]] === 'R' && precedence[ops[0]] === precedence[op])) {
        right = makeTree(right, ops, rights, precedence[ops[0]]);
      }
      left = new BinaryExpression(left, op, right);
    }
    return left;
  }
docs: Modified Richards and Whitby-Stevens precedence climbing method.