NewIterator returns a new ItemIterator instance that uses the lexer.
()
| 60 | |
| 61 | // NewIterator returns a new ItemIterator instance that uses the lexer. |
| 62 | func (l *Lexer) NewIterator() *ItemIterator { |
| 63 | it := &ItemIterator{ |
| 64 | l: l, |
| 65 | idx: -1, |
| 66 | } |
| 67 | return it |
| 68 | } |
| 69 | |
| 70 | // Errorf returns an error message using the location of the next item in the iterator. |
| 71 | func (p *ItemIterator) Errorf(format string, args ...interface{}) error { |
no outgoing calls