WIP -- more thinking about how to work priorities into FSM

This commit is contained in:
Chris Fallin
2021-09-03 17:46:52 -07:00
parent 6a567924cd
commit f2399c5384
4 changed files with 93 additions and 4 deletions

View File

@@ -238,12 +238,19 @@ impl<'a> Parser<'a> {
fn parse_etor(&mut self) -> ParseResult<Extern> {
let pos = self.pos();
let infallible = if self.is_sym_str("infallible") {
self.symbol()?;
true
} else {
false
};
let term = self.parse_ident()?;
let func = self.parse_ident()?;
Ok(Extern::Extractor {
term,
func,
pos: pos.unwrap(),
infallible,
})
}