From 8cf226a35d9015532a9624118c09903aaa443640 Mon Sep 17 00:00:00 2001 From: Ryan Chandler Date: Wed, 30 Nov 2022 00:20:36 +0000 Subject: [PATCH] parser: allow reserved words in class method names --- src/parser/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()?;