Delimiter
This commit is contained in:
parent
b760ec7eca
commit
e5b6f2bc2f
@ -153,17 +153,10 @@ pub fn program(input: Span) -> ParseResult<AST> {
|
||||
fn block_template<'a, O>(
|
||||
input_parser: impl Parser<Span<'a>, O, VerboseError<Span<'a>>>,
|
||||
) -> impl FnMut(Span<'a>) -> IResult<Span<'a>, Vec<O>, VerboseError<Span<'a>>> {
|
||||
map(
|
||||
delimited(
|
||||
tok(char('{')),
|
||||
tuple((
|
||||
many0(statement_delimiter),
|
||||
separated_list0(many1(statement_delimiter), input_parser),
|
||||
many0(statement_delimiter),
|
||||
)),
|
||||
tok(char('}')),
|
||||
),
|
||||
|(_, items, _)| items,
|
||||
delimited(
|
||||
pair(tok(char('{')), many0(statement_delimiter)),
|
||||
separated_list0(many1(statement_delimiter), input_parser),
|
||||
pair(many0(statement_delimiter), tok(char('}'))),
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user