code: private void evaluateTag(StringBuilder buf) {
      // Trim the '{' and '}' bounding characters.
      tag.pos++;
      tag.end--;
  
      // If this tag has been hidden from the processor, skip over the '-' and
      // emit the tag body.
      if (tag.peek() == Chars.MINUS_SIGN) {
        tag.pos++;
        buf.append('{');
        buf.append(tag.token());
        buf.append('}');
        return;
      }
      
      List<MessageArg> args = getArgs();
      if (args == null || args.size() == 0) {
        return;
      }
  
      MessageArg arg = args.get(0);
  
      // Process a short tag like "{1}" by just appending the argument value.
      if (tag.peek() == Chars.EOF) {
        if (arg.resolve()) {
          buf.append(arg.asString());
        }
        return;
      }
  
      // Parse the formatter name and execute the associated formatting method.
      if (tag.seek(FORMATTER, choice)) {
        String formatter = choice.token().toString();
        tag.jump(choice);
        switch (formatter) {
          case PLURAL:
            evalPlural(arg, true);
            break;
  
          case SELECTORDINAL:
            evalPlural(arg, false);
            break;
  
          case SELECT:
            evalSelect(arg);
            break;
            
          case CURRENCY:
          case MONEY:
            evalCurrency(arg);
            break;
  
          case DATETIME:
            evalDateTime(arg);
            break;
            
          case DATETIME_INTERVAL:
            evalDateTimeInterval(args);
            break;
  
          case DECIMAL:
          case NUMBER:
            evalNumber(arg);
            break;
            
          case UNIT:
            evalUnit(arg);
            break;
        }
      }
    }
docs: Parse and evaluate a tag.