mirror of
https://github.com/RustPython/Parser.git
synced 2025-09-03 17:10:58 +00:00
Update auto-generated ast code
This commit is contained in:
parent
33092d8002
commit
385c522471
3 changed files with 56 additions and 12 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue