From b6fca1f6ddd323d28601078103a38f64736fb0b8 Mon Sep 17 00:00:00 2001 From: rzvxa Date: Mon, 22 Jul 2024 10:03:06 +0330 Subject: [PATCH] refactor: make schema fields public. --- tasks/ast_codegen/src/defs.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tasks/ast_codegen/src/defs.rs b/tasks/ast_codegen/src/defs.rs index ad7b5cb69706ef..4ab475fb1b28fb 100644 --- a/tasks/ast_codegen/src/defs.rs +++ b/tasks/ast_codegen/src/defs.rs @@ -11,38 +11,38 @@ pub enum TypeDef { #[derive(Debug, Serialize)] pub struct StructDef { - name: TypeName, - fields: Vec, - has_lifetime: bool, + pub name: TypeName, + pub fields: Vec, + pub has_lifetime: bool, } #[derive(Debug, Serialize)] pub struct EnumDef { - name: TypeName, - variants: Vec, + pub name: TypeName, + pub variants: Vec, /// For `@inherits` inherited enum variants - inherits: Vec, - has_lifetime: bool, + pub inherits: Vec, + pub has_lifetime: bool, } #[derive(Debug, Serialize)] pub struct EnumVariantDef { - name: TypeName, - fields: Vec, - discriminant: Option, + pub name: TypeName, + pub fields: Vec, + pub discriminant: Option, } #[derive(Debug, Serialize)] pub struct EnumInheritDef { - super_name: String, - variants: Vec, + pub super_name: String, + pub variants: Vec, } #[derive(Debug, Serialize)] pub struct FieldDef { /// `None` if unnamed - name: Option, - r#type: TypeName, + pub name: Option, + pub r#type: TypeName, } impl From<&RType> for Option {