diff --git a/src/parser/mod.rs b/src/parser/mod.rs index c5ae050..0f68186 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -1294,7 +1294,8 @@ impl Parser { false }; - let name = self.ident()?; + // FIXME: We should only allow reserved words for class methods, not top-level functions. + let name = self.ident_maybe_reserved()?; self.lparen()?;