diff --git a/schala-lang/language/src/parser.rs b/schala-lang/language/src/parser.rs index 4990190..704e05d 100644 --- a/schala-lang/language/src/parser.rs +++ b/schala-lang/language/src/parser.rs @@ -345,13 +345,12 @@ fn expr_or_block(text: &str) -> ParseResult { } fn block(text: &str) -> ParseResult { - 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 {