Next loads the next token. Returns true if a token was loaded; false otherwise. If false, all tokens have been consumed.
()
| 58 | // was loaded; false otherwise. If false, all tokens |
| 59 | // have been consumed. |
| 60 | func (d *Dispenser) Next() bool { |
| 61 | if d.cursor < len(d.tokens)-1 { |
| 62 | d.cursor++ |
| 63 | return true |
| 64 | } |
| 65 | return false |
| 66 | } |
| 67 | |
| 68 | // Prev moves to the previous token. It does the inverse |
| 69 | // of Next(), except this function may decrement the cursor |
no outgoing calls
no test coverage detected