Use tag in block
This commit is contained in:
parent
ed68b57736
commit
e0a4ea1675
@ -345,13 +345,12 @@ fn expr_or_block(text: &str) -> ParseResult<Block> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn 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
|
//TODO fix this so it can handle nested statements
|
||||||
delimited(ws(char('{')),
|
delimited(ws(tag("{")),
|
||||||
separated_nonempty_list(statement_sep,
|
separated_nonempty_list(statement_sep,
|
||||||
map(expression, |e| Statement { id: ItemId::new(0), kind: StatementKind::Expression(e) })
|
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> {
|
fn call_expr(text: &str) -> ParseResult<ExpressionKind> {
|
||||||
|
Loading…
Reference in New Issue
Block a user