Parse anonymous function definitions

This commit is contained in:
Joscha 2022-11-19 19:13:30 +01:00
parent 9a1bb92dfe
commit ff3edf17e5
4 changed files with 73 additions and 4 deletions

View file

@ -25,7 +25,7 @@ fn table_pattern_elem() -> impl Parser<char, TablePatternElem, Error = Error> +
named.or(positional)
}
fn table_pattern() -> impl Parser<char, TablePattern, Error = Error> + Clone {
pub fn table_pattern() -> BoxedParser<'static, char, TablePattern, Error> {
let elem = space()
.then(table_pattern_elem())
.then(space())
@ -43,6 +43,7 @@ fn table_pattern() -> impl Parser<char, TablePattern, Error = Error> + Clone {
trailing_comma,
span,
})
.boxed()
}
pub fn table_destr(