Use tag in block

This commit is contained in:
greg 2020-03-15 00:57:22 -07:00
parent ed68b57736
commit e0a4ea1675

View File

@ -345,13 +345,12 @@ fn expr_or_block(text: &str) -> ParseResult<Block> {
}
fn block(text: &str) -> ParseResult<Block> {
use nom::character::complete::char;
//TODO fix this so it can handle nested statements
delimited(ws(char('{')),
delimited(ws(tag("{")),
separated_nonempty_list(statement_sep,
map(expression, |e| Statement { id: ItemId::new(0), kind: StatementKind::Expression(e) })
),
ws(char('}')))(text)
ws(tag("}")))(text)
}
fn call_expr(text: &str) -> ParseResult<ExpressionKind> {