Field identifiers now include specific spans (Closes #8263).

This commit is contained in:
Joshua Yanovski 2013-10-28 19:22:42 -07:00
parent dba6070080
commit 01ab8542fb
10 changed files with 22 additions and 18 deletions

View file

@ -1549,10 +1549,11 @@ impl Parser {
pub fn parse_field(&self) -> Field {
let lo = self.span.lo;
let i = self.parse_ident();
let hi = self.last_span.hi;
self.expect(&token::COLON);
let e = self.parse_expr();
ast::Field {
ident: i,
ident: spanned(lo, hi, i),
expr: e,
span: mk_sp(lo, e.span.hi),
}