fix(parser): fix conflict

This commit is contained in:
GreasySlug 2023-04-01 11:28:31 +09:00
parent 855be06c26
commit 723e75813e
2 changed files with 3 additions and 3 deletions

View file

@ -2168,10 +2168,11 @@ impl Parser {
obj = obj.attr_expr(ident); obj = obj.attr_expr(ident);
} }
NatLit => { NatLit => {
let index = Literal::from(self.lpop()); let index = Literal::from(token);
obj = obj.tuple_attr_expr(index); obj = obj.tuple_attr_expr(index);
} }
Newline => { Newline => {
self.restore(token);
self.restore(vis); self.restore(vis);
break; break;
} }
@ -3017,7 +3018,6 @@ impl Parser {
debug_exit_info!(self); debug_exit_info!(self);
return Err(()); return Err(());
}; };
self.skip();
if let Some(args) = self if let Some(args) = self
.opt_reduce_args(false) .opt_reduce_args(false)
.transpose() .transpose()

View file

@ -69,7 +69,7 @@ fn exec_invalid_chunk_prs_err() -> Result<(), ()> {
#[test] #[test]
fn expect_failure_collections_err() -> Result<(), ()> { fn expect_failure_collections_err() -> Result<(), ()> {
expect_failure("tests/invalid_collections.er", 33) expect_failure("tests/invalid_collections.er", 30)
} }
#[test] #[test]