From c36eec216aad588da5b049652036d0f3fd428495 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 26 Feb 2024 16:03:18 -0600 Subject: [PATCH] parser: Allow StmtKind to parse itself (whoops!) --- libconlang/src/parser.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libconlang/src/parser.rs b/libconlang/src/parser.rs index b1c0dd0..a0e0b66 100644 --- a/libconlang/src/parser.rs +++ b/libconlang/src/parser.rs @@ -439,12 +439,7 @@ impl<'t> Parser<'t> { const PARSING: Parsing = Parsing::Stmt; let start = self.loc(); Ok(Stmt { - kind: match self.peek_type(PARSING)? { - Type::Semi => Ok(StmtKind::Empty), - Type::Keyword(Keyword::Let) => self.stmtkind_local(), - item_like!() => self.stmtkind_item(), - _ => self.stmtkind_expr(), - }?, + kind: self.stmtkind()?, semi: match self.peek_type(PARSING) { Ok(Type::Semi) => { self.consume_peeked();