mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 20:34:44 +00:00
Update parse.rs
This commit is contained in:
parent
b7b3e0f27c
commit
18e6c1be9a
1 changed files with 6 additions and 1 deletions
|
@ -291,7 +291,12 @@ impl Parser {
|
|||
self.level -= 1;
|
||||
return Ok(block);
|
||||
}
|
||||
assert!(self.cur_is(Newline));
|
||||
if !self.cur_is(Newline) {
|
||||
let err = self.skip_and_throw_syntax_err("try_reduce_block");
|
||||
self.level -= 1;
|
||||
self.errs.push(err);
|
||||
return Err(());
|
||||
}
|
||||
self.skip();
|
||||
if !self.cur_is(Indent) {
|
||||
let err = self.skip_and_throw_syntax_err("try_reduce_block");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue