parseIgnoredIncludingComments method

List<PropertiesComment> parseIgnoredIncludingComments (GsonParsable p)

Implementation

List<PropertiesComment> parseIgnoredIncludingComments(GsonParsable p) {
  List<PropertiesComment> comments = [];
  while (_IGNORED2.hasMatch(p.actual()) || p.actual() == "#" ) {
    if(p.actual() == "#") {
      String comment = "";
      while(p.actual() != "\n" && p.hasNext()) {
        comment += p.actual();
        if(p.hasNext()) {
          p.skip();
        }
        else {
          break;
        }
      }
      comments.add(new PropertiesComment(comment.substring(1)));
    }
    if(p.hasNext()) {
      p.skip();
    }
    else {break;
    }
  }
  return comments;
}