diff --git a/parser/src/python.lalrpop b/parser/src/python.lalrpop index fe584d8..ddda88d 100644 --- a/parser/src/python.lalrpop +++ b/parser/src/python.lalrpop @@ -1174,19 +1174,19 @@ TypeParamList: Vec = { }; TypeParam: ast::TypeParam = { - >)?> => { + >)?> >)?> => { 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() } ) }, - "*" => { + "*" >)?> => { 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() } ) }, - "**" => { + "**" >)?> => { 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() } ) } };