mirror of
https://github.com/danog/parser.git
synced 2024-11-26 20:04:57 +01:00
parser: parse namespace into single node
This commit is contained in:
parent
807c9e73cd
commit
9ad5f54a75
@ -200,7 +200,11 @@ impl Parser {
|
||||
let body = if braced {
|
||||
self.block(&TokenKind::RightBrace)?
|
||||
} else {
|
||||
Block::new()
|
||||
let mut body = Block::new();
|
||||
while ! self.is_eof() {
|
||||
body.push(self.top_level_statement()?);
|
||||
}
|
||||
body
|
||||
};
|
||||
|
||||
if braced {
|
||||
|
Loading…
Reference in New Issue
Block a user