Read read from token stream.
()
| 87 | |
| 88 | // Read read from token stream. |
| 89 | func (t *TokenReader) Read() *token.TokenType { |
| 90 | if int(t.pos) >= len(t.tokens) { |
| 91 | return nil |
| 92 | } |
| 93 | tokenType := t.tokens[t.pos] |
| 94 | t.pos += 1 |
| 95 | return tokenType |
| 96 | } |
| 97 | |
| 98 | func (t *TokenReader) UnRead() { |
| 99 | if t.pos > 0 { |
no outgoing calls
no test coverage detected