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),
|
seq_sep_trailing_disallowed(token::COMMA),
|
||||||
|p| p.parse_expr()
|
|p| p.parse_expr()
|
||||||
);
|
);
|
||||||
hi = self.span.hi;
|
hi = self.last_span.hi;
|
||||||
|
|
||||||
let nd = self.mk_call(e, es, NoSugar);
|
let nd = self.mk_call(e, es, NoSugar);
|
||||||
e = self.mk_expr(lo, hi, nd);
|
e = self.mk_expr(lo, hi, nd);
|
||||||
@ -2035,7 +2035,7 @@ impl Parser {
|
|||||||
token::LBRACKET => {
|
token::LBRACKET => {
|
||||||
self.bump();
|
self.bump();
|
||||||
let ix = self.parse_expr();
|
let ix = self.parse_expr();
|
||||||
hi = ix.span.hi;
|
hi = self.span.hi;
|
||||||
self.commit_expr_expecting(ix, token::RBRACKET);
|
self.commit_expr_expecting(ix, token::RBRACKET);
|
||||||
let index = self.mk_index(e, ix);
|
let index = self.mk_index(e, ix);
|
||||||
e = self.mk_expr(lo, hi, index)
|
e = self.mk_expr(lo, hi, index)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user