clean up debug code
This commit is contained in:
parent
10512b2932
commit
1b08eaca20
5 changed files with 5 additions and 21 deletions
|
@ -1775,21 +1775,13 @@ impl<'a> Parser<'a> {
|
|||
lo: Span,
|
||||
result: PResult<'a, P<Expr>>,
|
||||
) -> P<Expr> {
|
||||
use crate::parser::DUMMY_NODE_ID;
|
||||
match result {
|
||||
Ok(x) => x,
|
||||
Err(mut err) => {
|
||||
err.emit();
|
||||
// Recover from parse error, callers expect the closing delim to be consumed.
|
||||
self.consume_block(delim, ConsumeClosingDelim::Yes);
|
||||
debug!("recover_seq_parse_error: consumed tokens until {:?} {:?}", lo, self.token);
|
||||
let res = self.mk_expr(lo.to(self.prev_token.span), ExprKind::Err);
|
||||
if res.id == DUMMY_NODE_ID {
|
||||
//panic!("debug now ....: {:?}", res);
|
||||
res
|
||||
} else {
|
||||
res
|
||||
}
|
||||
self.mk_expr(lo.to(self.prev_token.span), ExprKind::Err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1871,7 +1863,6 @@ impl<'a> Parser<'a> {
|
|||
&& brace_depth == 0
|
||||
&& bracket_depth == 0 =>
|
||||
{
|
||||
debug!("recover_stmt_ return - Comma");
|
||||
break;
|
||||
}
|
||||
_ => self.bump(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue