mirror of
https://github.com/danog/parser.git
synced 2025-01-22 21:11:55 +01:00
parser: allow fqn and qualified names in extends & implements
This commit is contained in:
parent
874e59d270
commit
fa7472f616
@ -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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user