mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-07 21:25:31 +00:00
Update python.lalrpop
This commit is contained in:
parent
385c522471
commit
7101e9276f
1 changed files with 6 additions and 6 deletions
|
@ -1174,19 +1174,19 @@ TypeParamList: Vec<ast::TypeParam> = {
|
|||
};
|
||||
|
||||
TypeParam: ast::TypeParam = {
|
||||
<location:@L> <name:Identifier> <bound:(":" <Test<"all">>)?> <end_location:@R> => {
|
||||
<location:@L> <name:Identifier> <bound:(":" <Test<"all">>)?> <default:("=" <Test<"all">>)?> <end_location:@R> => {
|
||||
ast::TypeParam::TypeVar(
|
||||
ast::TypeParamTypeVar { name, bound: bound.map(Box::new), range: (location..end_location).into() }
|
||||
ast::TypeParamTypeVar { name, bound: bound.map(Box::new), default_value: default.map(Box::new), range: (location..end_location).into() }
|
||||
)
|
||||
},
|
||||
<location:@L> "*" <name:Identifier> <end_location:@R> => {
|
||||
<location:@L> "*" <name:Identifier> <default:("=" <Test<"all">>)?> <end_location:@R> => {
|
||||
ast::TypeParam::TypeVarTuple(
|
||||
ast::TypeParamTypeVarTuple { name, range: (location..end_location).into() }
|
||||
ast::TypeParamTypeVarTuple { name, default_value: default.map(Box::new), range: (location..end_location).into() }
|
||||
)
|
||||
},
|
||||
<location:@L> "**" <name:Identifier> <end_location:@R> => {
|
||||
<location:@L> "**" <name:Identifier> <default:("=" <Test<"all">>)?> <end_location:@R> => {
|
||||
ast::TypeParam::ParamSpec(
|
||||
ast::TypeParamParamSpec { name, range: (location..end_location).into() }
|
||||
ast::TypeParamParamSpec { name, default_value: default.map(Box::new), range: (location..end_location).into() }
|
||||
)
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue