docs: private void append(Token token, String content) {
      if (content.isEmpty()) {
        throw new IllegalStateException(
            String.format(
                "shouldn't append empty content: %s @ %s",
                SoyFileParserConstants.tokenImage[token.kind], Tokens.createSrcLoc(fileName, token)));
      }
      // add a new offset if:
      // - this is the first token
      // - the previous token introduced a discontinuity (due to a special token, or whitespace
      //   joining)
      // - this token doesn't directly abut the previous token (this happens when there is a comment)
      boolean addOffset = false;
      if (offsets.isEmpty()) {
        addOffset = true;
      } else if (discontinuityReason != Reason.NONE) {
        addOffset = true;
      } else {
        // are the two tokens not adjacent? We don't actually record comments in the AST or token
        // stream so this is kind of a guess, but all known cases are due to comments.
        if (offsets.endLine() == token.beginLine) {
          if (offsets.endColumn() + 1 != token.beginColumn) {
            addOffset = true;
            discontinuityReason = Reason.COMMENT;
          }
        } else if (offsets.endLine() + 1 == token.beginLine && token.beginColumn != 1) {
          addOffset = true;
          discontinuityReason = Reason.COMMENT;
        }
      }
      if (addOffset) {
        offsets.add(buffer.length(), token.beginLine, token.beginColumn, discontinuityReason);
        discontinuityReason = Reason.NONE;
      }
      offsets.setEndLocation(token.endLine, token.endColumn);
      buffer.append(content);
    }