Associate multiple with a crate too.
This commit is contained in:
parent
e9035f7bef
commit
b82795244e
17 changed files with 28 additions and 27 deletions
|
@ -27,8 +27,7 @@ impl<'a> Parser<'a> {
|
|||
/// Parses a source module as a crate. This is the main entry point for the parser.
|
||||
pub fn parse_crate_mod(&mut self) -> PResult<'a, ast::Crate> {
|
||||
let (attrs, items, spans) = self.parse_mod(&token::Eof)?;
|
||||
let span = spans.inner_span;
|
||||
Ok(ast::Crate { attrs, items, span, id: DUMMY_NODE_ID, is_placeholder: false })
|
||||
Ok(ast::Crate { attrs, items, spans, id: DUMMY_NODE_ID, is_placeholder: false })
|
||||
}
|
||||
|
||||
/// Parses a `mod <foo> { ... }` or `mod <foo>;` item.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue