docs: private DelTemplateKey resolveVariantExpression() {
      if (delTemplateVariantExpr == null) {
        delTemplateKey = DelTemplateKey.create(delTemplateName, "");
        return delTemplateKey;
      }
      ExprNode exprNode = delTemplateVariantExpr.getRoot();
      if (exprNode instanceof GlobalNode) {
        GlobalNode globalNode = (GlobalNode) exprNode;
        if (globalNode.isResolved()) {
          exprNode = globalNode.getValue();
        } else {
          // This global was not substituted.  This happens when TemplateRegistries are built for
          // message extraction and parseinfo generation.  To make this 'work' we just use the Global
          // name for the variant value.  This is fine and will help catch some errors.
          // Because these nodes won't be used for code generation this should be safe.
          // For this reason we also don't store the key, instead we just return it.
          return DelTemplateKey.create(delTemplateName, globalNode.getName());
        }
      }
      if (exprNode instanceof IntegerNode) {
        // Globals were already substituted: We may now create the definitive variant and key fields
        // on this node.
        long variantValue = ((IntegerNode) exprNode).getValue();
        delTemplateKey = DelTemplateKey.create(delTemplateName, String.valueOf(variantValue));
      } else if (exprNode instanceof StringNode) {
        // Globals were already substituted: We may now create the definitive variant and key fields
        // on this node.
        delTemplateKey = DelTemplateKey.create(delTemplateName, ((StringNode) exprNode).getValue());
      } else {
        // We must have already reported an error, just create an arbitrary variant expr.
        delTemplateKey = DelTemplateKey.create(delTemplateName, exprNode.toSourceString());
      }
      return delTemplateKey;
    }