mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-24 21:44:45 +00:00
added lex error: DuplicateArguments
This commit is contained in:
parent
5380b85579
commit
15ab44384c
3 changed files with 68 additions and 24 deletions
|
@ -21,6 +21,7 @@ pub enum LexicalErrorType {
|
|||
TabError,
|
||||
TabsAfterSpaces,
|
||||
DefaultArgumentError,
|
||||
DuplicateArgumentError,
|
||||
PositionalArgumentError,
|
||||
UnpackedArgumentError,
|
||||
DuplicateKeywordArgumentError,
|
||||
|
@ -50,6 +51,9 @@ impl fmt::Display for LexicalErrorType {
|
|||
LexicalErrorType::DefaultArgumentError => {
|
||||
write!(f, "non-default argument follows default argument")
|
||||
}
|
||||
LexicalErrorType::DuplicateArgumentError => {
|
||||
write!(f, "duplicate argument in function definition")
|
||||
}
|
||||
LexicalErrorType::DuplicateKeywordArgumentError => {
|
||||
write!(f, "keyword argument repeated")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue