parser: allow fqn and qualified names in extends & implements

This commit is contained in:
Ryan Chandler 2022-08-09 21:28:43 +01:00
parent 874e59d270
commit fa7472f616
No known key found for this signature in database
GPG Key ID: F113BCADDB3B0CCA

View File

@ -789,7 +789,7 @@ impl Parser {
if self.current.kind == TokenKind::Extends { if self.current.kind == TokenKind::Extends {
self.next(); self.next();
extends = Some(self.ident()?.into()); extends = Some(self.full_name()?.into());
} }
let mut implements = Vec::new(); let mut implements = Vec::new();
@ -799,7 +799,7 @@ impl Parser {
while self.current.kind != TokenKind::LeftBrace { while self.current.kind != TokenKind::LeftBrace {
self.optional_comma()?; self.optional_comma()?;
implements.push(self.ident()?.into()); implements.push(self.full_name()?.into());
} }
} }
@ -1270,7 +1270,7 @@ impl Parser {
if self.current.kind == TokenKind::Extends { if self.current.kind == TokenKind::Extends {
self.next(); self.next();
extends = Some(self.ident()?.into()); extends = Some(self.full_name()?.into());
} }
let mut implements = Vec::new(); let mut implements = Vec::new();
@ -1280,7 +1280,7 @@ impl Parser {
while self.current.kind != TokenKind::LeftBrace { while self.current.kind != TokenKind::LeftBrace {
self.optional_comma()?; self.optional_comma()?;
implements.push(self.ident()?.into()); implements.push(self.full_name()?.into());
} }
} }