Skip to content

Commit

Permalink
Correct span for ExprFnBlock, ExprMethodCall, ExprParen
Browse files Browse the repository at this point in the history
  • Loading branch information
sanxiyn committed Feb 7, 2014
1 parent 104002b commit 5109d1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libsyntax/parse/parser.rs
Expand Up @@ -1771,7 +1771,7 @@ impl Parser {
self.commit_expr_expecting(*es.last().unwrap(), token::RPAREN);

return if es.len() == 1 && !trailing_comma {
self.mk_expr(lo, self.span.hi, ExprParen(es[0]))
self.mk_expr(lo, hi, ExprParen(es[0]))
}
else {
self.mk_expr(lo, hi, ExprTup(es))
Expand Down Expand Up @@ -1994,7 +1994,7 @@ impl Parser {
seq_sep_trailing_disallowed(token::COMMA),
|p| p.parse_expr()
);
hi = self.span.hi;
hi = self.last_span.hi;

es.unshift(e);
let nd = self.mk_method_call(i, tys, es, NoSugar);
Expand Down Expand Up @@ -2510,7 +2510,7 @@ impl Parser {
parse_decl: |&mut Parser| -> P<FnDecl>,
parse_body: |&mut Parser| -> @Expr)
-> @Expr {
let lo = self.last_span.lo;
let lo = self.span.lo;
let decl = parse_decl(self);
let body = parse_body(self);
let fakeblock = P(ast::Block {
Expand Down

0 comments on commit 5109d1a

Please sign in to comment.