mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-22 12:35:22 +00:00
Fix unpack_ex related messages
This commit is contained in:
parent
3f1b9c6096
commit
1257331101
1 changed files with 8 additions and 1 deletions
|
@ -1399,7 +1399,14 @@ impl<O: OutputStream> Compiler<O> {
|
|||
}
|
||||
}
|
||||
}
|
||||
_ => return Err(self.error(CompileErrorType::Assign(target.name()))),
|
||||
_ => {
|
||||
return Err(self.error(match target.node {
|
||||
ast::ExpressionType::Starred { .. } => CompileErrorType::SyntaxError(
|
||||
"starred assignment target must be in a list or tuple".to_owned(),
|
||||
),
|
||||
_ => CompileErrorType::Assign(target.name()),
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue