Extracts the next available statement from the input stream, or `None` if none is available. The stream is always left in a position where the next statement extraction can be tried.
(&mut self)
| 2010 | /// |
| 2011 | /// The stream is always left in a position where the next statement extraction can be tried. |
| 2012 | fn parse_one_safe(&mut self) -> Result<Option<Statement>> { |
| 2013 | let result = self.parse_one(); |
| 2014 | if result.is_err() { |
| 2015 | self.reset()?; |
| 2016 | } |
| 2017 | result |
| 2018 | } |
| 2019 | } |
| 2020 | |
| 2021 | /// Iterator that yields parsed statements from an input stream. |
no test coverage detected