code: public Object add(Object left, Object right, ParserRuleContext errCtx) {
      if (left == null && right == null) {
        return 0;
      }
  
      // if either are collections... concatenate them
      if (left instanceof Collection<?> || right instanceof Collection<?>) {
        List<Object> res = newArrayList();
        res.addAll(toCollection(left));
        res.addAll(toCollection(right));
        return res;
      }
  
      // if either are strings... concatenate them
      if (left instanceof String || right instanceof String) {
        return toString(left).concat(toString(right));
      }
  
      // if both are maps... concatenate them
      if (left instanceof Map<?, ?> || right instanceof Map<?, ?>) {
        Map<Object, Object> res = newHashMap();
        res.putAll((Map<?, ?>) left);
        res.putAll((Map<?, ?>) right);
        return res;
      }
  
      try {
  
        // if either are floating point (double or float) use double
        if (isFloatingPointNumber(left) || isFloatingPointNumber(right)) {
          double l = toDouble(left);
          double r = toDouble(right);
          return new Double(l + r);
        }
  
        // if either are bigdecimal use that type
        if (left instanceof BigDecimal || right instanceof BigDecimal) {
          BigDecimal l = toBigDecimal(left);
          BigDecimal r = toBigDecimal(right);
          BigDecimal result = l.add(r, getMathContext());
          return narrowBigDecimal(left, right, result);
        }
  
        // if either are numbers use integers
        if (left instanceof Number || right instanceof Number) {
          BigInteger l = toBigInteger(left);
          BigInteger r = toBigInteger(right);
          BigInteger result = l.add(r);
          return narrowBigInteger(left, right, result);
        }
  
      }
      catch (java.lang.NumberFormatException nfe) {
      }
  
      throw new ExecutionException("invalid operands for +", interpreter.getLocation(errCtx));
    }
docs: Add two values together.
  <p>
  If any numeric add fails on coercion to the appropriate type, treat as
  Strings and do concatenation.
  </p>
  
  @param left
  first value
  @param right
  second value
  @return left + right.