code: func (p *Parser) Parse(r io.Reader, name string) (*File, error) {
  	p.reset()
  	p.f = &File{Name: name}
  	p.src = r
  	p.rune()
  	p.next()
  	p.f.Stmts, p.f.Last = p.stmtList()
  	if p.err == nil {
  		// EOF immediately after heredoc word so no newline to
  		// trigger it
  		p.doHeredocs()
  	}
  	return p.f, p.err
  }
docs: // Parse reads and parses a shell program with an optional name. It
  // returns the parsed program if no issues were encountered. Otherwise,
  // an error is returned. Reads from r are buffered.
  //
  // Parse can be called more than once, but not concurrently. That is, a
  // Parser can be reused once it is done working.