mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-08 05:35:22 +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 = {
|
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::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::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::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