parser: allow reserved words in class method names

This commit is contained in:
Ryan Chandler 2022-11-30 00:20:36 +00:00
parent 5d95a8985c
commit 8cf226a35d
No known key found for this signature in database
GPG Key ID: F113BCADDB3B0CCA

View File

@ -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()?;