Next loads the next token. Returns true if a token was loaded; false otherwise. If false, all tokens have been consumed.
()
| 72 | // was loaded; false otherwise. If false, all tokens |
| 73 | // have been consumed. |
| 74 | func (d *Dispenser) Next() bool { |
| 75 | if d.cursor < len(d.tokens)-1 { |
| 76 | d.cursor++ |
| 77 | return true |
| 78 | } |
| 79 | return false |
| 80 | } |
| 81 | |
| 82 | // NextArg loads the next token if it is on the same |
| 83 | // line. Returns true if a token was loaded; false |
no outgoing calls