Skip to content

Commit

Permalink
Correct span for ExprCall and ExprIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
sanxiyn committed Jan 16, 2014
1 parent 77eedda commit 1f5dc55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2025,7 +2025,7 @@ impl Parser {
seq_sep_trailing_disallowed(token::COMMA),
|p| p.parse_expr()
);
hi = self.span.hi;
hi = self.last_span.hi;

let nd = self.mk_call(e, es, NoSugar);
e = self.mk_expr(lo, hi, nd);
Expand All @@ -2035,7 +2035,7 @@ impl Parser {
token::LBRACKET => {
self.bump();
let ix = self.parse_expr();
hi = ix.span.hi;
hi = self.span.hi;
self.commit_expr_expecting(ix, token::RBRACKET);
let index = self.mk_index(e, ix);
e = self.mk_expr(lo, hi, index)
Expand Down

5 comments on commit 1f5dc55

@bors
Copy link
Contributor

@bors bors commented on 1f5dc55 Jan 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from luqmana
at sanxiyn@1f5dc55

@bors
Copy link
Contributor

@bors bors commented on 1f5dc55 Jan 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging sanxiyn/rust/accurate-span-3 = 1f5dc55 into auto

@bors
Copy link
Contributor

@bors bors commented on 1f5dc55 Jan 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sanxiyn/rust/accurate-span-3 = 1f5dc55 merged ok, testing candidate = 9434e7c

@bors
Copy link
Contributor

@bors bors commented on 1f5dc55 Jan 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 1f5dc55 Jan 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 9434e7c

Please sign in to comment.