Generic types to generic (#30)

This commit is contained in:
Jeong, YunWon 2023-05-15 20:22:42 +09:00 committed by GitHub
parent 718354673e
commit b78001c953
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 65 additions and 68 deletions

View file

@ -3,7 +3,7 @@
use crate::text_size::TextRange;
#[derive(Clone, Debug, PartialEq)]
pub struct ModModule<R = TextRange> {
pub range: crate::ranged::OptionalRange<R>,
pub range: OptionalRange<R>,
pub body: Vec<Stmt<R>>,
pub type_ignores: Vec<TypeIgnore<R>>,
}
@ -16,7 +16,7 @@ impl<R> From<ModModule<R>> for Mod<R> {
#[derive(Clone, Debug, PartialEq)]
pub struct ModInteractive<R = TextRange> {
pub range: crate::ranged::OptionalRange<R>,
pub range: OptionalRange<R>,
pub body: Vec<Stmt<R>>,
}
@ -28,7 +28,7 @@ impl<R> From<ModInteractive<R>> for Mod<R> {
#[derive(Clone, Debug, PartialEq)]
pub struct ModExpression<R = TextRange> {
pub range: crate::ranged::OptionalRange<R>,
pub range: OptionalRange<R>,
pub body: Box<Expr<R>>,
}
@ -40,7 +40,7 @@ impl<R> From<ModExpression<R>> for Mod<R> {
#[derive(Clone, Debug, PartialEq)]
pub struct ModFunctionType<R = TextRange> {
pub range: crate::ranged::OptionalRange<R>,
pub range: OptionalRange<R>,
pub argtypes: Vec<Expr<R>>,
pub returns: Box<Expr<R>>,
}
@ -957,7 +957,7 @@ pub struct Comprehension<R = TextRange> {
pub iter: Expr<R>,
pub ifs: Vec<Expr<R>>,
pub is_async: bool,
pub range: crate::ranged::OptionalRange<R>,
pub range: OptionalRange<R>,
}
#[derive(Clone, Debug, PartialEq)]
@ -988,7 +988,7 @@ pub struct Arguments<R = TextRange> {
pub kw_defaults: Vec<Expr<R>>,
pub kwarg: Option<Box<Arg<R>>>,
pub defaults: Vec<Expr<R>>,
pub range: crate::ranged::OptionalRange<R>,
pub range: OptionalRange<R>,
}
#[derive(Clone, Debug, PartialEq)]
@ -1017,7 +1017,7 @@ pub struct Alias<R = TextRange> {
pub struct Withitem<R = TextRange> {
pub context_expr: Expr<R>,
pub optional_vars: Option<Box<Expr<R>>>,
pub range: crate::ranged::OptionalRange<R>,
pub range: OptionalRange<R>,
}
#[derive(Clone, Debug, PartialEq)]
@ -1025,7 +1025,7 @@ pub struct MatchCase<R = TextRange> {
pub pattern: Pattern<R>,
pub guard: Option<Box<Expr<R>>>,
pub body: Vec<Stmt<R>>,
pub range: crate::ranged::OptionalRange<R>,
pub range: OptionalRange<R>,
}
#[derive(Clone, Debug, PartialEq)]
@ -1144,7 +1144,7 @@ pub enum Pattern<R = TextRange> {
#[derive(Clone, Debug, PartialEq)]
pub struct TypeIgnoreTypeIgnore<R = TextRange> {
pub range: crate::ranged::OptionalRange<R>,
pub range: OptionalRange<R>,
pub lineno: Int,
pub tag: String,
}