diff --git a/src/parser/mod.rs b/src/parser/mod.rs index f63066f..f172b30 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -746,7 +746,7 @@ impl Parser { self.next(); - let name = self.ident()?; + let name = self.ident_maybe_reserved()?; self.lparen()?; @@ -778,7 +778,7 @@ impl Parser { TokenKind::Function => { self.next(); - let name = self.ident()?; + let name = self.ident_maybe_reserved()?; self.lparen()?;