1
Fork 0

Associate multiple with a crate too.

This commit is contained in:
Felix S. Klock II 2022-03-03 18:45:25 -05:00
parent e9035f7bef
commit b82795244e
17 changed files with 28 additions and 27 deletions

View file

@ -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.