MCPcopy Index your code
hub / github.com/endbasic/endbasic / parse_one_safe

Method parse_one_safe

core/src/parser.rs:2012–2018  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 5

parse_untilMethod · 0.80
parse_if_multilineMethod · 0.80
parse_callable_bodyMethod · 0.80
parse_selectMethod · 0.80
nextMethod · 0.80

Calls 2

parse_oneMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected