@Override
    public @NotNull TokenEmitter argument(final @NotNull String arg, final @NotNull QuotingOverride quotingPreference) {
      if (!this.tagState.isTag) {
        throw new IllegalStateException("Not within a tag!");
      }
      this.consumer.append(TokenParser.SEPARATOR);
      this.escapeTagContent(arg, requireNonNull(quotingPreference, "quotingPreference"));
      return this;
    }
mark tag boundaries within the stack, without needing to mess with typing too much.
text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/MiniMessageSerializer.java