mirror of
https://github.com/danog/parser.git
synced 2025-01-22 13:01:32 +01:00
parser: skip comments above trait statements
This commit is contained in:
parent
9e441143c5
commit
19213d2d05
@ -697,6 +697,7 @@ impl Parser {
|
||||
|
||||
let mut body = Block::new();
|
||||
while self.current.kind != TokenKind::RightBrace {
|
||||
self.skip_comments();
|
||||
match self.class_statement()? {
|
||||
Statement::ClassConstant { .. } => {
|
||||
return Err(ParseError::TraitCannotContainConstant(self.current.span))
|
||||
|
Loading…
x
Reference in New Issue
Block a user