setRecovery turns on recovery mode without actually doing any recovery. This can be used when a parser knowingly leaves the peeker in a useless place and wants to suppress errors that might result from that decision.
()
| 2070 | // This can be used when a parser knowingly leaves the peeker in a useless |
| 2071 | // place and wants to suppress errors that might result from that decision. |
| 2072 | func (p *parser) setRecovery() { |
| 2073 | p.recovery = true |
| 2074 | } |
| 2075 | |
| 2076 | // recover seeks forward in the token stream until it finds TokenType "end", |
| 2077 | // then returns with the peeker pointed at the following token. |
no outgoing calls
no test coverage detected