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

Implement Ranged for TypeParam #32

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion ast/src/ranged.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,30 @@ impl Ranged for crate::TypeIgnore {
}
}
}

impl Ranged for crate::generic::TypeParamTypeVar {
fn range(&self) -> TextRange {
self.range
}
}
impl Ranged for crate::generic::TypeParamTypeVarTuple {
fn range(&self) -> TextRange {
self.range
}
}
impl Ranged for crate::generic::TypeParamParamSpec {
fn range(&self) -> TextRange {
self.range
}
}
impl Ranged for crate::TypeParam {
fn range(&self) -> TextRange {
match self {
Self::TypeVar(node) => node.range(),
Self::TypeVarTuple(node) => node.range(),
Self::ParamSpec(node) => node.range(),
}
}
}
impl Ranged for crate::generic::Decorator {
fn range(&self) -> TextRange {
self.range
Expand Down