parser: support class constant fetches

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

View File

@ -2359,6 +2359,11 @@ impl Parser {
self.next();
Expression::Identifier { name: ident }
}
TokenKind::Class => {
self.next();
// FIXME: Can this be represented in a nicer way? Kind of hacky.
Expression::Identifier { name: "class".into() }
},
_ => {
return expected_token_err!(["`{`", "`$`", "an identifier"], self);
}