parser: Allow StmtKind to parse itself (whoops!)
This commit is contained in:
parent
66deb41301
commit
c36eec216a
@ -439,12 +439,7 @@ impl<'t> Parser<'t> {
|
|||||||
const PARSING: Parsing = Parsing::Stmt;
|
const PARSING: Parsing = Parsing::Stmt;
|
||||||
let start = self.loc();
|
let start = self.loc();
|
||||||
Ok(Stmt {
|
Ok(Stmt {
|
||||||
kind: match self.peek_type(PARSING)? {
|
kind: self.stmtkind()?,
|
||||||
Type::Semi => Ok(StmtKind::Empty),
|
|
||||||
Type::Keyword(Keyword::Let) => self.stmtkind_local(),
|
|
||||||
item_like!() => self.stmtkind_item(),
|
|
||||||
_ => self.stmtkind_expr(),
|
|
||||||
}?,
|
|
||||||
semi: match self.peek_type(PARSING) {
|
semi: match self.peek_type(PARSING) {
|
||||||
Ok(Type::Semi) => {
|
Ok(Type::Semi) => {
|
||||||
self.consume_peeked();
|
self.consume_peeked();
|
||||||
|
Loading…
Reference in New Issue
Block a user