advance moves to the next token
()
| 851 | |
| 852 | // advance moves to the next token |
| 853 | func (p *Parser) advance() { |
| 854 | p.currentPos++ |
| 855 | if p.currentPos < len(p.tokens) { |
| 856 | p.currentToken = p.tokens[p.currentPos] |
| 857 | } else { |
| 858 | p.currentToken = models.TokenWithSpan{} // EOF sentinel |
| 859 | } |
| 860 | } |
| 861 | |
| 862 | // peekToken returns the next token without advancing the parser position. |
| 863 | // Returns an empty TokenWithSpan if at the end of input. |
no outgoing calls
no test coverage detected