parseImpliedToken parses a token as though it had appeared in the parser's input.
(t TokenType, dataAtom a.Atom, data string)
| 2186 | // parseImpliedToken parses a token as though it had appeared in the parser's |
| 2187 | // input. |
| 2188 | func (p *parser) parseImpliedToken(t TokenType, dataAtom a.Atom, data string) { |
| 2189 | realToken, selfClosing := p.tok, p.hasSelfClosingToken |
| 2190 | p.tok = Token{ |
| 2191 | Type: t, |
| 2192 | DataAtom: dataAtom, |
| 2193 | Data: data, |
| 2194 | } |
| 2195 | p.hasSelfClosingToken = false |
| 2196 | p.parseCurrentToken() |
| 2197 | p.tok, p.hasSelfClosingToken = realToken, selfClosing |
| 2198 | } |
| 2199 | |
| 2200 | // parseCurrentToken runs the current token through the parsing routines |
| 2201 | // until it is consumed. |
no test coverage detected