Correct span for ExprCall and ExprIndex
This commit is contained in:
parent
77eeddaa48
commit
1f5dc552d6
@ -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);
|
||||
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user