Update auto-generated ast code

This commit is contained in:
Lee Dogeon 2025-02-11 14:48:06 +09:00
parent 33092d8002
commit 385c522471
No known key found for this signature in database
GPG key ID: A6FBB8C59908DE9D
3 changed files with 56 additions and 12 deletions

View file

@ -1,7 +1,8 @@
// File automatically generated by ast/asdl_rs.py.
use crate::text_size::TextRange;
#[derive(Clone, Debug, PartialEq, is_macro::Is)]
#[derive(Clone, Debug, PartialEq)]
#[derive(is_macro::Is)]
pub enum Ast<R = TextRange> {
#[is(name = "module")]
Mod(Mod<R>),
@ -3131,11 +3132,12 @@ pub struct TypeParamTypeVar<R = TextRange> {
pub range: R,
pub name: Identifier,
pub bound: Option<Box<Expr<R>>>,
pub default_value: Option<Box<Expr<R>>>,
}
impl<R> Node for TypeParamTypeVar<R> {
const NAME: &'static str = "TypeVar";
const FIELD_NAMES: &'static [&'static str] = &["name", "bound"];
const FIELD_NAMES: &'static [&'static str] = &["name", "bound", "default_value"];
}
impl<R> From<TypeParamTypeVar<R>> for TypeParam<R> {
fn from(payload: TypeParamTypeVar<R>) -> Self {
@ -3153,11 +3155,12 @@ impl<R> From<TypeParamTypeVar<R>> for Ast<R> {
pub struct TypeParamParamSpec<R = TextRange> {
pub range: R,
pub name: Identifier,
pub default_value: Option<Box<Expr<R>>>,
}
impl<R> Node for TypeParamParamSpec<R> {
const NAME: &'static str = "ParamSpec";
const FIELD_NAMES: &'static [&'static str] = &["name"];
const FIELD_NAMES: &'static [&'static str] = &["name", "default_value"];
}
impl<R> From<TypeParamParamSpec<R>> for TypeParam<R> {
fn from(payload: TypeParamParamSpec<R>) -> Self {
@ -3175,11 +3178,12 @@ impl<R> From<TypeParamParamSpec<R>> for Ast<R> {
pub struct TypeParamTypeVarTuple<R = TextRange> {
pub range: R,
pub name: Identifier,
pub default_value: Option<Box<Expr<R>>>,
}
impl<R> Node for TypeParamTypeVarTuple<R> {
const NAME: &'static str = "TypeVarTuple";
const FIELD_NAMES: &'static [&'static str] = &["name"];
const FIELD_NAMES: &'static [&'static str] = &["name", "default_value"];
}
impl<R> From<TypeParamTypeVarTuple<R>> for TypeParam<R> {
fn from(payload: TypeParamTypeVarTuple<R>) -> Self {