code: private String getNextLineOrVirtualBlankLineAtEndOfStream(String nextLine) {
          if ((nextLine == null) && !isEndOfStream) {
              isEndOfStream = true;
              return "";
          }
  
          return nextLine;
      }
docs: Guarantees that a virtual blank line is injected at the end of the input
  stream to ensure the parser attempts to transition to the {@code END}
  state, if necessary, when the end of stream is reached.