syntax: use lookahead to distinguish inner and outer attributes, instead of passing the latter around.

This commit is contained in:
Eduard Burtescu 2015-03-13 11:34:51 +02:00
parent 79dd393a4f
commit 9889aae13e
11 changed files with 325 additions and 512 deletions

View file

@ -115,7 +115,7 @@ pub fn expand_include<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree
-> Option<SmallVector<P<ast::Item>>> {
let mut ret = SmallVector::zero();
while self.p.token != token::Eof {
match self.p.parse_item_with_outer_attributes() {
match self.p.parse_item() {
Some(item) => ret.push(item),
None => self.p.span_fatal(
self.p.span,