cleanup is used to avoid holding on to memory unnecessarily (for the cases where we reuse a scanner).
()
| 56 | // cleanup is used to avoid holding on to memory unnecessarily (for the cases |
| 57 | // where we reuse a scanner). |
| 58 | func (l *lexer) cleanup() { |
| 59 | l.tokens = nil |
| 60 | l.stmt = nil |
| 61 | l.lastError = nil |
| 62 | } |
| 63 | |
| 64 | // Lex lexes a token from input. |
| 65 | // to push the tokens back (move l.pos back). |