1
Fork 0

auto merge of #6208 : sanxiyn/rust/accurate-span, r=sanxiyn

This commit is contained in:
bors 2013-05-05 11:12:37 -07:00
commit 6e6a4be19d
4 changed files with 6 additions and 6 deletions

View file

@ -156,7 +156,7 @@ impl parser_attr for Parser {
@spanned(lo, hi, ast::meta_list(name, inner_items))
}
_ => {
let hi = self.span.hi;
let hi = self.last_span.hi;
@spanned(lo, hi, ast::meta_word(name))
}
}

View file

@ -122,7 +122,7 @@ pub impl Parser {
fn parse_path_list_ident(&self) -> ast::path_list_ident {
let lo = self.span.lo;
let ident = self.parse_ident();
let hi = self.span.hi;
let hi = self.last_span.hi;
spanned(lo, hi, ast::path_list_ident_ { name: ident,
id: self.get_id() })
}

View file

@ -591,7 +591,7 @@ mod test {
types: ~[]},
None // no idea
),
span: sp(0,3)}, // really?
span: sp(0,1)},
id: 4 // fixme
})
}
@ -628,7 +628,7 @@ mod test {
types: ~[]},
None // no idea
),
span: sp(6,9)}, // bleah.
span: sp(6,7)},
id: 4 // fixme
}],
output: @ast::Ty{id:5, // fixme

View file

@ -2444,7 +2444,7 @@ pub impl Parser {
}
}
}
hi = self.span.hi;
hi = self.last_span.hi;
}
}
@ast::pat { id: self.get_id(), node: pat, span: mk_sp(lo, hi) }
@ -4308,7 +4308,7 @@ pub impl Parser {
rp: None,
types: ~[] };
return @spanned(lo,
self.span.hi,
self.last_span.hi,
view_path_simple(last, path, self.get_id()));
}