code: def parse_block(self, stream, has_end):
          
          statements = []
          while 1:
              self.skip_whitespace_or_comment(stream)
  
              if has_end(stream):
                  return statements
  
              statement = self.parse_statement(stream)
              if isinstance(statement, EmptyValueAtLine):
                  if len(statements) == 0:
                      self.raise_unexpected(stream)
                  self.skip_whitespace_or_comment(stream)
                  value = self.parse_value(stream)
                  last_statement = statements.pop(-1)
                  fixed_last = (
                      last_statement[0],
                      statement
                  )
                  statements.append(fixed_last)
                  statements.append((last_statement[1], value))
  
              else:
                  statements.append(statement)
docs: PVLModuleContents ::= (Statement | WSC)* EndStatement?
          AggrObject ::= BeginObjectStmt AggrContents EndObjectStmt
          AggrGroup ::= BeginGroupStmt AggrContents EndGroupStmt
          AggrContents := WSC Statement (WSC | Statement)*