code: func ParseStatements(filename, input string) ([]Statement, []*Comment, error) {
  
  	bs := []byte(input)
  
  	parsed, err := Parse(filename, bs, GlobalStore(filenameKey, filename), CommentsOption())
  	if err != nil {
  		return nil, nil, formatParserErrors(filename, bs, err)
  	}
  
  	var comments []*Comment
  	var sl []interface{}
  	if p, ok := parsed.(program); ok {
  		sl = p.buf
  		commentMap := p.comments.(map[commentKey]*Comment)
  		commentKeys := []commentKey{}
  		for k := range commentMap {
  			commentKeys = append(commentKeys, k)
  		}
  		sort.Slice(commentKeys, func(i, j int) bool {
  			return commentKeys[i].Compare(commentKeys[j]) < 0
  		})
  		for _, k := range commentKeys {
  			comments = append(comments, commentMap[k])
  		}
  	} else {
  		sl = parsed.([]interface{})
  	}
  	stmts := make([]Statement, 0, len(sl))
  
  	for _, x := range sl {
  		if rules, ok := x.([]*Rule); ok {
  			for _, rule := range rules {
  				stmts = append(stmts, rule)
  			}
  		} else {
  			// Unchecked cast should be safe. A panic indicates grammar is
  			// out-of-sync.
  			stmts = append(stmts, x.(Statement))
  		}
  	}
  
  	return stmts, comments, postProcess(filename, stmts)
  }
docs: // ParseStatements returns a slice of parsed statements.
  // This is the default return value from the parser.