pident returns the i'th token if it is an PIdent, otherwise nil.
(i int)
| 663 | |
| 664 | // pident returns the i'th token if it is an PIdent, otherwise nil. |
| 665 | func (p *parser) pident(i int) *Token { |
| 666 | if tok := p.tok(i); tok != nil && tok.Type == PIdent { |
| 667 | return tok |
| 668 | } |
| 669 | return nil |
| 670 | } |
| 671 | |
| 672 | // comment returns true if the i'th token is a Comment, otherwise false. |
| 673 | func (p *parser) comment(i int) bool { |
no test coverage detected