operator returns the operator for the i'th token, or and empty string if the i'th token is not an operator.
(i int)
| 647 | // operator returns the operator for the i'th token, or and empty string if the |
| 648 | // i'th token is not an operator. |
| 649 | func (p *parser) operator(i int) string { |
| 650 | if tok := p.tok(i); tok != nil && tok.Type == Operator { |
| 651 | return tok.Text(p.lines) |
| 652 | } |
| 653 | return "" |
| 654 | } |
| 655 | |
| 656 | // ident returns the i'th token if it is an Ident, otherwise nil. |
| 657 | func (p *parser) ident(i int) *Token { |
no test coverage detected