Skip to content
This repository was archived by the owner on Jul 27, 2023. It is now read-only.

Commit 7822404

Browse files
committed
Implement Ranged for TypeParam
1 parent 126652b commit 7822404

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

ast/src/ranged.rs

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,30 @@ impl Ranged for crate::TypeIgnore {
521521
}
522522
}
523523
}
524-
524+
impl Ranged for crate::generic::TypeParamTypeVar {
525+
fn range(&self) -> TextRange {
526+
self.range
527+
}
528+
}
529+
impl Ranged for crate::generic::TypeParamTypeVarTuple {
530+
fn range(&self) -> TextRange {
531+
self.range
532+
}
533+
}
534+
impl Ranged for crate::generic::TypeParamParamSpec {
535+
fn range(&self) -> TextRange {
536+
self.range
537+
}
538+
}
539+
impl Ranged for crate::TypeParam {
540+
fn range(&self) -> TextRange {
541+
match self {
542+
Self::TypeVar(node) => node.range(),
543+
Self::TypeVarTuple(node) => node.range(),
544+
Self::ParamSpec(node) => node.range(),
545+
}
546+
}
547+
}
525548
impl Ranged for crate::generic::Decorator {
526549
fn range(&self) -> TextRange {
527550
self.range

0 commit comments

Comments
 (0)