diff --git a/src/v2/lu_dog/types.rs b/src/v2/lu_dog/types.rs index 7942ffaa..0538889b 100644 --- a/src/v2/lu_dog/types.rs +++ b/src/v2/lu_dog/types.rs @@ -3,6 +3,7 @@ pub mod a_wait; pub mod addition; pub mod and; +pub mod any_list; pub mod argument; pub mod assignment; pub mod binary; @@ -117,6 +118,8 @@ pub use crate::v2::lu_dog::addition::Addition; pub use crate::v2::lu_dog::addition::ADDITION; pub use crate::v2::lu_dog::and::And; pub use crate::v2::lu_dog::and::AND; +pub use crate::v2::lu_dog::any_list::AnyList; +pub use crate::v2::lu_dog::any_list::ANY_LIST; pub use crate::v2::lu_dog::argument::Argument; pub use crate::v2::lu_dog::assignment::Assignment; pub use crate::v2::lu_dog::assignment::ASSIGNMENT; diff --git a/src/v2/lu_dog/types/any_list.rs b/src/v2/lu_dog/types/any_list.rs new file mode 100644 index 00000000..7380244f --- /dev/null +++ b/src/v2/lu_dog/types/any_list.rs @@ -0,0 +1,33 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"any_list-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-const-documentation"}}} +/// A list that does not enforce that it’s elements all share a type. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-const-definition"}}} +pub const ANY_LIST: Uuid = uuid!["356fe736-c2f0-5d4e-baa6-8725754ed1d3"]; + +#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] +pub struct AnyList; + +impl AnyList { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + ANY_LIST + } +} + +impl Default for AnyList { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog/types/value_type.rs b/src/v2/lu_dog/types/value_type.rs index 6141fb82..926afaba 100644 --- a/src/v2/lu_dog/types/value_type.rs +++ b/src/v2/lu_dog/types/value_type.rs @@ -4,6 +4,7 @@ use std::cell::RefCell; use std::rc::Rc; use uuid::Uuid; +use crate::v2::lu_dog::types::any_list::ANY_LIST; use crate::v2::lu_dog::types::char::CHAR; use crate::v2::lu_dog::types::empty::EMPTY; use crate::v2::lu_dog::types::enum_generic::EnumGeneric; @@ -67,6 +68,7 @@ pub struct ValueType { // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-hybrid-enum-definition"}}} #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] pub enum ValueTypeEnum { + AnyList(Uuid), Char(Uuid), Empty(Uuid), EnumGeneric(Uuid), @@ -90,6 +92,19 @@ pub enum ValueTypeEnum { // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-implementation"}}} impl ValueType { // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-new-impl"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_any_list"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_any_list(bogus: bool, store: &mut LuDogStore) -> Rc> { + let id = Uuid::new_v4(); + let new = Rc::new(RefCell::new(ValueType { + bogus: bogus, + subtype: ValueTypeEnum::AnyList(ANY_LIST), + id, + })); + store.inter_value_type(new.clone()); + new + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_char"}}} /// Inter a new ValueType in the store, and return it's `id`. pub fn new_char(bogus: bool, store: &mut LuDogStore) -> Rc> { diff --git a/src/v2/lu_dog_ndrwlock_vec/store.rs b/src/v2/lu_dog_ndrwlock_vec/store.rs index d6fe2787..433c36b8 100644 --- a/src/v2/lu_dog_ndrwlock_vec/store.rs +++ b/src/v2/lu_dog_ndrwlock_vec/store.rs @@ -108,10 +108,10 @@ use crate::v2::lu_dog_ndrwlock_vec::types::{ StringBit, StringLiteral, StructExpression, StructField, StructGeneric, TupleField, TypeCast, Unary, Unit, UnnamedFieldExpression, ValueType, Variable, VariableExpression, WoogStruct, XFuture, XIf, XMacro, XMatch, XPath, XPlugin, XPrint, XReturn, XValue, ZObjectStore, ADDITION, - AND, ASSIGNMENT, CHAR, DIVISION, EMPTY, EMPTY_EXPRESSION, EQUAL, FALSE_LITERAL, FROM, FULL, - GREATER_THAN, GREATER_THAN_OR_EQUAL, INCLUSIVE, ITEM_STATEMENT, LESS_THAN, LESS_THAN_OR_EQUAL, - MACRO_CALL, MULTIPLICATION, NEGATION, NOT, NOT_EQUAL, OR, RANGE, SUBTRACTION, TASK, TO, - TO_INCLUSIVE, TRUE_LITERAL, UNKNOWN, X_DEBUGGER, + AND, ANY_LIST, ASSIGNMENT, CHAR, DIVISION, EMPTY, EMPTY_EXPRESSION, EQUAL, FALSE_LITERAL, FROM, + FULL, GREATER_THAN, GREATER_THAN_OR_EQUAL, INCLUSIVE, ITEM_STATEMENT, LESS_THAN, + LESS_THAN_OR_EQUAL, MACRO_CALL, MULTIPLICATION, NEGATION, NOT, NOT_EQUAL, OR, RANGE, + SUBTRACTION, TASK, TO, TO_INCLUSIVE, TRUE_LITERAL, UNKNOWN, X_DEBUGGER, }; #[derive(Debug)] diff --git a/src/v2/lu_dog_ndrwlock_vec/types.rs b/src/v2/lu_dog_ndrwlock_vec/types.rs index 2226bd68..d12a1bf7 100644 --- a/src/v2/lu_dog_ndrwlock_vec/types.rs +++ b/src/v2/lu_dog_ndrwlock_vec/types.rs @@ -3,6 +3,7 @@ pub mod a_wait; pub mod addition; pub mod and; +pub mod any_list; pub mod argument; pub mod assignment; pub mod binary; @@ -117,6 +118,8 @@ pub use crate::v2::lu_dog_ndrwlock_vec::addition::Addition; pub use crate::v2::lu_dog_ndrwlock_vec::addition::ADDITION; pub use crate::v2::lu_dog_ndrwlock_vec::and::And; pub use crate::v2::lu_dog_ndrwlock_vec::and::AND; +pub use crate::v2::lu_dog_ndrwlock_vec::any_list::AnyList; +pub use crate::v2::lu_dog_ndrwlock_vec::any_list::ANY_LIST; pub use crate::v2::lu_dog_ndrwlock_vec::argument::Argument; pub use crate::v2::lu_dog_ndrwlock_vec::assignment::Assignment; pub use crate::v2::lu_dog_ndrwlock_vec::assignment::ASSIGNMENT; diff --git a/src/v2/lu_dog_ndrwlock_vec/types/any_list.rs b/src/v2/lu_dog_ndrwlock_vec/types/any_list.rs new file mode 100644 index 00000000..6758bde3 --- /dev/null +++ b/src/v2/lu_dog_ndrwlock_vec/types/any_list.rs @@ -0,0 +1,33 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"any_list-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-const-documentation"}}} +/// A list that does not enforce that it’s elements all share a type. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-const-definition"}}} +pub const ANY_LIST: Uuid = uuid!["356fe736-c2f0-5d4e-baa6-8725754ed1d3"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct AnyList; + +impl AnyList { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + ANY_LIST + } +} + +impl Default for AnyList { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_ndrwlock_vec/types/value_type.rs b/src/v2/lu_dog_ndrwlock_vec/types/value_type.rs index 0c4d63f7..dca2bf21 100644 --- a/src/v2/lu_dog_ndrwlock_vec/types/value_type.rs +++ b/src/v2/lu_dog_ndrwlock_vec/types/value_type.rs @@ -4,6 +4,7 @@ use no_deadlocks::RwLock; use std::sync::Arc; use uuid::Uuid; +use crate::v2::lu_dog_ndrwlock_vec::types::any_list::ANY_LIST; use crate::v2::lu_dog_ndrwlock_vec::types::char::CHAR; use crate::v2::lu_dog_ndrwlock_vec::types::empty::EMPTY; use crate::v2::lu_dog_ndrwlock_vec::types::enum_generic::EnumGeneric; @@ -65,6 +66,7 @@ pub struct ValueType { // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-hybrid-enum-definition"}}} #[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] pub enum ValueTypeEnum { + AnyList(Uuid), Char(Uuid), Empty(Uuid), EnumGeneric(usize), @@ -87,6 +89,18 @@ pub enum ValueTypeEnum { // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-implementation"}}} impl ValueType { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_any_list"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_any_list(bogus: bool, store: &mut LuDogNdrwlockVecStore) -> Arc> { + store.inter_value_type(|id| { + Arc::new(RwLock::new(ValueType { + bogus: bogus, + subtype: ValueTypeEnum::AnyList(ANY_LIST), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_char"}}} /// Inter a new ValueType in the store, and return it's `id`. pub fn new_char(bogus: bool, store: &mut LuDogNdrwlockVecStore) -> Arc> { diff --git a/src/v2/lu_dog_pl_vec/store.rs b/src/v2/lu_dog_pl_vec/store.rs index 13ef07a7..e4c0a4a6 100644 --- a/src/v2/lu_dog_pl_vec/store.rs +++ b/src/v2/lu_dog_pl_vec/store.rs @@ -113,10 +113,10 @@ use crate::v2::lu_dog_pl_vec::types::{ StringBit, StringLiteral, StructExpression, StructField, StructGeneric, TupleField, TypeCast, Unary, Unit, UnnamedFieldExpression, ValueType, Variable, VariableExpression, WoogStruct, XFuture, XIf, XMacro, XMatch, XPath, XPlugin, XPrint, XReturn, XValue, ZObjectStore, ADDITION, - AND, ASSIGNMENT, CHAR, DIVISION, EMPTY, EMPTY_EXPRESSION, EQUAL, FALSE_LITERAL, FROM, FULL, - GREATER_THAN, GREATER_THAN_OR_EQUAL, INCLUSIVE, ITEM_STATEMENT, LESS_THAN, LESS_THAN_OR_EQUAL, - MACRO_CALL, MULTIPLICATION, NEGATION, NOT, NOT_EQUAL, OR, RANGE, SUBTRACTION, TASK, TO, - TO_INCLUSIVE, TRUE_LITERAL, UNKNOWN, X_DEBUGGER, + AND, ANY_LIST, ASSIGNMENT, CHAR, DIVISION, EMPTY, EMPTY_EXPRESSION, EQUAL, FALSE_LITERAL, FROM, + FULL, GREATER_THAN, GREATER_THAN_OR_EQUAL, INCLUSIVE, ITEM_STATEMENT, LESS_THAN, + LESS_THAN_OR_EQUAL, MACRO_CALL, MULTIPLICATION, NEGATION, NOT, NOT_EQUAL, OR, RANGE, + SUBTRACTION, TASK, TO, TO_INCLUSIVE, TRUE_LITERAL, UNKNOWN, X_DEBUGGER, }; #[derive(Debug, Deserialize, Serialize)] diff --git a/src/v2/lu_dog_pl_vec/types.rs b/src/v2/lu_dog_pl_vec/types.rs index c0aa9025..a41351d6 100644 --- a/src/v2/lu_dog_pl_vec/types.rs +++ b/src/v2/lu_dog_pl_vec/types.rs @@ -3,6 +3,7 @@ pub mod a_wait; pub mod addition; pub mod and; +pub mod any_list; pub mod argument; pub mod assignment; pub mod binary; @@ -117,6 +118,8 @@ pub use crate::v2::lu_dog_pl_vec::addition::Addition; pub use crate::v2::lu_dog_pl_vec::addition::ADDITION; pub use crate::v2::lu_dog_pl_vec::and::And; pub use crate::v2::lu_dog_pl_vec::and::AND; +pub use crate::v2::lu_dog_pl_vec::any_list::AnyList; +pub use crate::v2::lu_dog_pl_vec::any_list::ANY_LIST; pub use crate::v2::lu_dog_pl_vec::argument::Argument; pub use crate::v2::lu_dog_pl_vec::assignment::Assignment; pub use crate::v2::lu_dog_pl_vec::assignment::ASSIGNMENT; diff --git a/src/v2/lu_dog_pl_vec/types/any_list.rs b/src/v2/lu_dog_pl_vec/types/any_list.rs new file mode 100644 index 00000000..6758bde3 --- /dev/null +++ b/src/v2/lu_dog_pl_vec/types/any_list.rs @@ -0,0 +1,33 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"any_list-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-const-documentation"}}} +/// A list that does not enforce that it’s elements all share a type. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-const-definition"}}} +pub const ANY_LIST: Uuid = uuid!["356fe736-c2f0-5d4e-baa6-8725754ed1d3"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct AnyList; + +impl AnyList { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + ANY_LIST + } +} + +impl Default for AnyList { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_pl_vec/types/value_type.rs b/src/v2/lu_dog_pl_vec/types/value_type.rs index 10c694f8..e25d3df7 100644 --- a/src/v2/lu_dog_pl_vec/types/value_type.rs +++ b/src/v2/lu_dog_pl_vec/types/value_type.rs @@ -4,6 +4,7 @@ use parking_lot::RwLock; use std::sync::Arc; use uuid::Uuid; +use crate::v2::lu_dog_pl_vec::types::any_list::ANY_LIST; use crate::v2::lu_dog_pl_vec::types::char::CHAR; use crate::v2::lu_dog_pl_vec::types::empty::EMPTY; use crate::v2::lu_dog_pl_vec::types::enum_generic::EnumGeneric; @@ -65,6 +66,7 @@ pub struct ValueType { // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-hybrid-enum-definition"}}} #[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] pub enum ValueTypeEnum { + AnyList(Uuid), Char(Uuid), Empty(Uuid), EnumGeneric(usize), @@ -87,6 +89,18 @@ pub enum ValueTypeEnum { // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-implementation"}}} impl ValueType { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_any_list"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_any_list(bogus: bool, store: &mut LuDogPlVecStore) -> Arc> { + store.inter_value_type(|id| { + Arc::new(RwLock::new(ValueType { + bogus: bogus, + subtype: ValueTypeEnum::AnyList(ANY_LIST), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_char"}}} /// Inter a new ValueType in the store, and return it's `id`. pub fn new_char(bogus: bool, store: &mut LuDogPlVecStore) -> Arc> { diff --git a/src/v2/lu_dog_rwlock/types.rs b/src/v2/lu_dog_rwlock/types.rs index efb6dcdd..8bd319aa 100644 --- a/src/v2/lu_dog_rwlock/types.rs +++ b/src/v2/lu_dog_rwlock/types.rs @@ -3,6 +3,7 @@ pub mod a_wait; pub mod addition; pub mod and; +pub mod any_list; pub mod argument; pub mod assignment; pub mod binary; @@ -117,6 +118,8 @@ pub use crate::v2::lu_dog_rwlock::addition::Addition; pub use crate::v2::lu_dog_rwlock::addition::ADDITION; pub use crate::v2::lu_dog_rwlock::and::And; pub use crate::v2::lu_dog_rwlock::and::AND; +pub use crate::v2::lu_dog_rwlock::any_list::AnyList; +pub use crate::v2::lu_dog_rwlock::any_list::ANY_LIST; pub use crate::v2::lu_dog_rwlock::argument::Argument; pub use crate::v2::lu_dog_rwlock::assignment::Assignment; pub use crate::v2::lu_dog_rwlock::assignment::ASSIGNMENT; diff --git a/src/v2/lu_dog_rwlock/types/any_list.rs b/src/v2/lu_dog_rwlock/types/any_list.rs new file mode 100644 index 00000000..7380244f --- /dev/null +++ b/src/v2/lu_dog_rwlock/types/any_list.rs @@ -0,0 +1,33 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"any_list-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-const-documentation"}}} +/// A list that does not enforce that it’s elements all share a type. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-const-definition"}}} +pub const ANY_LIST: Uuid = uuid!["356fe736-c2f0-5d4e-baa6-8725754ed1d3"]; + +#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] +pub struct AnyList; + +impl AnyList { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + ANY_LIST + } +} + +impl Default for AnyList { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_rwlock/types/value_type.rs b/src/v2/lu_dog_rwlock/types/value_type.rs index 28234938..d089c990 100644 --- a/src/v2/lu_dog_rwlock/types/value_type.rs +++ b/src/v2/lu_dog_rwlock/types/value_type.rs @@ -4,6 +4,7 @@ use std::sync::Arc; use std::sync::RwLock; use uuid::Uuid; +use crate::v2::lu_dog_rwlock::types::any_list::ANY_LIST; use crate::v2::lu_dog_rwlock::types::char::CHAR; use crate::v2::lu_dog_rwlock::types::empty::EMPTY; use crate::v2::lu_dog_rwlock::types::enum_generic::EnumGeneric; @@ -67,6 +68,7 @@ pub struct ValueType { // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-hybrid-enum-definition"}}} #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] pub enum ValueTypeEnum { + AnyList(Uuid), Char(Uuid), Empty(Uuid), EnumGeneric(Uuid), @@ -90,6 +92,19 @@ pub enum ValueTypeEnum { // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-implementation"}}} impl ValueType { // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-new-impl"}}} + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_any_list"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_any_list(bogus: bool, store: &mut LuDogRwlockStore) -> Arc> { + let id = Uuid::new_v4(); + let new = Arc::new(RwLock::new(ValueType { + bogus: bogus, + subtype: ValueTypeEnum::AnyList(ANY_LIST), + id, + })); + store.inter_value_type(new.clone()); + new + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_char"}}} /// Inter a new ValueType in the store, and return it's `id`. pub fn new_char(bogus: bool, store: &mut LuDogRwlockStore) -> Arc> { diff --git a/src/v2/lu_dog_rwlock_vec/store.rs b/src/v2/lu_dog_rwlock_vec/store.rs index b5b7ba49..191d7677 100644 --- a/src/v2/lu_dog_rwlock_vec/store.rs +++ b/src/v2/lu_dog_rwlock_vec/store.rs @@ -113,10 +113,10 @@ use crate::v2::lu_dog_rwlock_vec::types::{ StringBit, StringLiteral, StructExpression, StructField, StructGeneric, TupleField, TypeCast, Unary, Unit, UnnamedFieldExpression, ValueType, Variable, VariableExpression, WoogStruct, XFuture, XIf, XMacro, XMatch, XPath, XPlugin, XPrint, XReturn, XValue, ZObjectStore, ADDITION, - AND, ASSIGNMENT, CHAR, DIVISION, EMPTY, EMPTY_EXPRESSION, EQUAL, FALSE_LITERAL, FROM, FULL, - GREATER_THAN, GREATER_THAN_OR_EQUAL, INCLUSIVE, ITEM_STATEMENT, LESS_THAN, LESS_THAN_OR_EQUAL, - MACRO_CALL, MULTIPLICATION, NEGATION, NOT, NOT_EQUAL, OR, RANGE, SUBTRACTION, TASK, TO, - TO_INCLUSIVE, TRUE_LITERAL, UNKNOWN, X_DEBUGGER, + AND, ANY_LIST, ASSIGNMENT, CHAR, DIVISION, EMPTY, EMPTY_EXPRESSION, EQUAL, FALSE_LITERAL, FROM, + FULL, GREATER_THAN, GREATER_THAN_OR_EQUAL, INCLUSIVE, ITEM_STATEMENT, LESS_THAN, + LESS_THAN_OR_EQUAL, MACRO_CALL, MULTIPLICATION, NEGATION, NOT, NOT_EQUAL, OR, RANGE, + SUBTRACTION, TASK, TO, TO_INCLUSIVE, TRUE_LITERAL, UNKNOWN, X_DEBUGGER, }; #[derive(Debug, Deserialize, Serialize)] diff --git a/src/v2/lu_dog_rwlock_vec/types.rs b/src/v2/lu_dog_rwlock_vec/types.rs index 14e6e0fe..2c34bb3a 100644 --- a/src/v2/lu_dog_rwlock_vec/types.rs +++ b/src/v2/lu_dog_rwlock_vec/types.rs @@ -3,6 +3,7 @@ pub mod a_wait; pub mod addition; pub mod and; +pub mod any_list; pub mod argument; pub mod assignment; pub mod binary; @@ -117,6 +118,8 @@ pub use crate::v2::lu_dog_rwlock_vec::addition::Addition; pub use crate::v2::lu_dog_rwlock_vec::addition::ADDITION; pub use crate::v2::lu_dog_rwlock_vec::and::And; pub use crate::v2::lu_dog_rwlock_vec::and::AND; +pub use crate::v2::lu_dog_rwlock_vec::any_list::AnyList; +pub use crate::v2::lu_dog_rwlock_vec::any_list::ANY_LIST; pub use crate::v2::lu_dog_rwlock_vec::argument::Argument; pub use crate::v2::lu_dog_rwlock_vec::assignment::Assignment; pub use crate::v2::lu_dog_rwlock_vec::assignment::ASSIGNMENT; diff --git a/src/v2/lu_dog_rwlock_vec/types/any_list.rs b/src/v2/lu_dog_rwlock_vec/types/any_list.rs new file mode 100644 index 00000000..6758bde3 --- /dev/null +++ b/src/v2/lu_dog_rwlock_vec/types/any_list.rs @@ -0,0 +1,33 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"any_list-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-const-documentation"}}} +/// A list that does not enforce that it’s elements all share a type. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-const-definition"}}} +pub const ANY_LIST: Uuid = uuid!["356fe736-c2f0-5d4e-baa6-8725754ed1d3"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct AnyList; + +impl AnyList { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + ANY_LIST + } +} + +impl Default for AnyList { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_rwlock_vec/types/value_type.rs b/src/v2/lu_dog_rwlock_vec/types/value_type.rs index 03542799..dd9dd88d 100644 --- a/src/v2/lu_dog_rwlock_vec/types/value_type.rs +++ b/src/v2/lu_dog_rwlock_vec/types/value_type.rs @@ -4,6 +4,7 @@ use std::sync::Arc; use std::sync::RwLock; use uuid::Uuid; +use crate::v2::lu_dog_rwlock_vec::types::any_list::ANY_LIST; use crate::v2::lu_dog_rwlock_vec::types::char::CHAR; use crate::v2::lu_dog_rwlock_vec::types::empty::EMPTY; use crate::v2::lu_dog_rwlock_vec::types::enum_generic::EnumGeneric; @@ -65,6 +66,7 @@ pub struct ValueType { // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-hybrid-enum-definition"}}} #[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] pub enum ValueTypeEnum { + AnyList(Uuid), Char(Uuid), Empty(Uuid), EnumGeneric(usize), @@ -87,6 +89,18 @@ pub enum ValueTypeEnum { // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-implementation"}}} impl ValueType { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_any_list"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_any_list(bogus: bool, store: &mut LuDogRwlockVecStore) -> Arc> { + store.inter_value_type(|id| { + Arc::new(RwLock::new(ValueType { + bogus: bogus, + subtype: ValueTypeEnum::AnyList(ANY_LIST), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_char"}}} /// Inter a new ValueType in the store, and return it's `id`. pub fn new_char(bogus: bool, store: &mut LuDogRwlockVecStore) -> Arc> { diff --git a/src/v2/lu_dog_vec/store.rs b/src/v2/lu_dog_vec/store.rs index 4cc128dd..077758bc 100644 --- a/src/v2/lu_dog_vec/store.rs +++ b/src/v2/lu_dog_vec/store.rs @@ -113,10 +113,10 @@ use crate::v2::lu_dog_vec::types::{ StringBit, StringLiteral, StructExpression, StructField, StructGeneric, TupleField, TypeCast, Unary, Unit, UnnamedFieldExpression, ValueType, Variable, VariableExpression, WoogStruct, XFuture, XIf, XMacro, XMatch, XPath, XPlugin, XPrint, XReturn, XValue, ZObjectStore, ADDITION, - AND, ASSIGNMENT, CHAR, DIVISION, EMPTY, EMPTY_EXPRESSION, EQUAL, FALSE_LITERAL, FROM, FULL, - GREATER_THAN, GREATER_THAN_OR_EQUAL, INCLUSIVE, ITEM_STATEMENT, LESS_THAN, LESS_THAN_OR_EQUAL, - MACRO_CALL, MULTIPLICATION, NEGATION, NOT, NOT_EQUAL, OR, RANGE, SUBTRACTION, TASK, TO, - TO_INCLUSIVE, TRUE_LITERAL, UNKNOWN, X_DEBUGGER, + AND, ANY_LIST, ASSIGNMENT, CHAR, DIVISION, EMPTY, EMPTY_EXPRESSION, EQUAL, FALSE_LITERAL, FROM, + FULL, GREATER_THAN, GREATER_THAN_OR_EQUAL, INCLUSIVE, ITEM_STATEMENT, LESS_THAN, + LESS_THAN_OR_EQUAL, MACRO_CALL, MULTIPLICATION, NEGATION, NOT, NOT_EQUAL, OR, RANGE, + SUBTRACTION, TASK, TO, TO_INCLUSIVE, TRUE_LITERAL, UNKNOWN, X_DEBUGGER, }; #[derive(Debug, Deserialize, Serialize)] diff --git a/src/v2/lu_dog_vec/types.rs b/src/v2/lu_dog_vec/types.rs index 65ca1e9f..6b7ef8e1 100644 --- a/src/v2/lu_dog_vec/types.rs +++ b/src/v2/lu_dog_vec/types.rs @@ -3,6 +3,7 @@ pub mod a_wait; pub mod addition; pub mod and; +pub mod any_list; pub mod argument; pub mod assignment; pub mod binary; @@ -117,6 +118,8 @@ pub use crate::v2::lu_dog_vec::addition::Addition; pub use crate::v2::lu_dog_vec::addition::ADDITION; pub use crate::v2::lu_dog_vec::and::And; pub use crate::v2::lu_dog_vec::and::AND; +pub use crate::v2::lu_dog_vec::any_list::AnyList; +pub use crate::v2::lu_dog_vec::any_list::ANY_LIST; pub use crate::v2::lu_dog_vec::argument::Argument; pub use crate::v2::lu_dog_vec::assignment::Assignment; pub use crate::v2::lu_dog_vec::assignment::ASSIGNMENT; diff --git a/src/v2/lu_dog_vec/types/any_list.rs b/src/v2/lu_dog_vec/types/any_list.rs new file mode 100644 index 00000000..6758bde3 --- /dev/null +++ b/src/v2/lu_dog_vec/types/any_list.rs @@ -0,0 +1,33 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"any_list-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-const-documentation"}}} +/// A list that does not enforce that it’s elements all share a type. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-const-definition"}}} +pub const ANY_LIST: Uuid = uuid!["356fe736-c2f0-5d4e-baa6-8725754ed1d3"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct AnyList; + +impl AnyList { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + ANY_LIST + } +} + +impl Default for AnyList { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec/types/value_type.rs b/src/v2/lu_dog_vec/types/value_type.rs index 43b4d939..d9fed96f 100644 --- a/src/v2/lu_dog_vec/types/value_type.rs +++ b/src/v2/lu_dog_vec/types/value_type.rs @@ -4,6 +4,7 @@ use std::cell::RefCell; use std::rc::Rc; use uuid::Uuid; +use crate::v2::lu_dog_vec::types::any_list::ANY_LIST; use crate::v2::lu_dog_vec::types::char::CHAR; use crate::v2::lu_dog_vec::types::empty::EMPTY; use crate::v2::lu_dog_vec::types::enum_generic::EnumGeneric; @@ -65,6 +66,7 @@ pub struct ValueType { // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-hybrid-enum-definition"}}} #[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] pub enum ValueTypeEnum { + AnyList(Uuid), Char(Uuid), Empty(Uuid), EnumGeneric(usize), @@ -87,6 +89,18 @@ pub enum ValueTypeEnum { // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-implementation"}}} impl ValueType { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_any_list"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_any_list(bogus: bool, store: &mut LuDogVecStore) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + bogus: bogus, + subtype: ValueTypeEnum::AnyList(ANY_LIST), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_char"}}} /// Inter a new ValueType in the store, and return it's `id`. pub fn new_char(bogus: bool, store: &mut LuDogVecStore) -> Rc> { diff --git a/src/v2/lu_dog_vec_tracy/store.rs b/src/v2/lu_dog_vec_tracy/store.rs index 80a3cabd..74064364 100644 --- a/src/v2/lu_dog_vec_tracy/store.rs +++ b/src/v2/lu_dog_vec_tracy/store.rs @@ -113,10 +113,10 @@ use crate::v2::lu_dog_vec_tracy::types::{ StringBit, StringLiteral, StructExpression, StructField, StructGeneric, TupleField, TypeCast, Unary, Unit, UnnamedFieldExpression, ValueType, Variable, VariableExpression, WoogStruct, XFuture, XIf, XMacro, XMatch, XPath, XPlugin, XPrint, XReturn, XValue, ZObjectStore, ADDITION, - AND, ASSIGNMENT, CHAR, DIVISION, EMPTY, EMPTY_EXPRESSION, EQUAL, FALSE_LITERAL, FROM, FULL, - GREATER_THAN, GREATER_THAN_OR_EQUAL, INCLUSIVE, ITEM_STATEMENT, LESS_THAN, LESS_THAN_OR_EQUAL, - MACRO_CALL, MULTIPLICATION, NEGATION, NOT, NOT_EQUAL, OR, RANGE, SUBTRACTION, TASK, TO, - TO_INCLUSIVE, TRUE_LITERAL, UNKNOWN, X_DEBUGGER, + AND, ANY_LIST, ASSIGNMENT, CHAR, DIVISION, EMPTY, EMPTY_EXPRESSION, EQUAL, FALSE_LITERAL, FROM, + FULL, GREATER_THAN, GREATER_THAN_OR_EQUAL, INCLUSIVE, ITEM_STATEMENT, LESS_THAN, + LESS_THAN_OR_EQUAL, MACRO_CALL, MULTIPLICATION, NEGATION, NOT, NOT_EQUAL, OR, RANGE, + SUBTRACTION, TASK, TO, TO_INCLUSIVE, TRUE_LITERAL, UNKNOWN, X_DEBUGGER, }; #[derive(Debug, Deserialize, Serialize)] diff --git a/src/v2/lu_dog_vec_tracy/types.rs b/src/v2/lu_dog_vec_tracy/types.rs index 5df94896..83b72f6d 100644 --- a/src/v2/lu_dog_vec_tracy/types.rs +++ b/src/v2/lu_dog_vec_tracy/types.rs @@ -3,6 +3,7 @@ pub mod a_wait; pub mod addition; pub mod and; +pub mod any_list; pub mod argument; pub mod assignment; pub mod binary; @@ -117,6 +118,8 @@ pub use crate::v2::lu_dog_vec_tracy::addition::Addition; pub use crate::v2::lu_dog_vec_tracy::addition::ADDITION; pub use crate::v2::lu_dog_vec_tracy::and::And; pub use crate::v2::lu_dog_vec_tracy::and::AND; +pub use crate::v2::lu_dog_vec_tracy::any_list::AnyList; +pub use crate::v2::lu_dog_vec_tracy::any_list::ANY_LIST; pub use crate::v2::lu_dog_vec_tracy::argument::Argument; pub use crate::v2::lu_dog_vec_tracy::assignment::Assignment; pub use crate::v2::lu_dog_vec_tracy::assignment::ASSIGNMENT; diff --git a/src/v2/lu_dog_vec_tracy/types/any_list.rs b/src/v2/lu_dog_vec_tracy/types/any_list.rs new file mode 100644 index 00000000..6758bde3 --- /dev/null +++ b/src/v2/lu_dog_vec_tracy/types/any_list.rs @@ -0,0 +1,33 @@ +// {"magic":"","directive":{"Start":{"directive":"allow-editing","tag":"any_list-struct-definition-file"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-use-statements"}}} +use serde::{Deserialize, Serialize}; +use uuid::{uuid, Uuid}; +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} + +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-const-documentation"}}} +/// A list that does not enforce that it’s elements all share a type. +/// +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"any_list-const-definition"}}} +pub const ANY_LIST: Uuid = uuid!["356fe736-c2f0-5d4e-baa6-8725754ed1d3"]; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub struct AnyList; + +impl AnyList { + pub fn new() -> Self { + Self {} + } + + pub fn id(&self) -> Uuid { + ANY_LIST + } +} + +impl Default for AnyList { + fn default() -> Self { + Self::new() + } +} +// {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} +// {"magic":"","directive":{"End":{"directive":"allow-editing"}}} diff --git a/src/v2/lu_dog_vec_tracy/types/value_type.rs b/src/v2/lu_dog_vec_tracy/types/value_type.rs index 0d1b32e3..08a99e68 100644 --- a/src/v2/lu_dog_vec_tracy/types/value_type.rs +++ b/src/v2/lu_dog_vec_tracy/types/value_type.rs @@ -5,6 +5,7 @@ use std::rc::Rc; use tracy_client::span; use uuid::Uuid; +use crate::v2::lu_dog_vec_tracy::types::any_list::ANY_LIST; use crate::v2::lu_dog_vec_tracy::types::char::CHAR; use crate::v2::lu_dog_vec_tracy::types::empty::EMPTY; use crate::v2::lu_dog_vec_tracy::types::enum_generic::EnumGeneric; @@ -66,6 +67,7 @@ pub struct ValueType { // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-hybrid-enum-definition"}}} #[derive(Clone, Debug, Deserialize, Serialize, PartialEq)] pub enum ValueTypeEnum { + AnyList(Uuid), Char(Uuid), Empty(Uuid), EnumGeneric(usize), @@ -88,6 +90,18 @@ pub enum ValueTypeEnum { // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-implementation"}}} impl ValueType { + // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_any_list"}}} + /// Inter a new ValueType in the store, and return it's `id`. + pub fn new_any_list(bogus: bool, store: &mut LuDogVecTracyStore) -> Rc> { + store.inter_value_type(|id| { + Rc::new(RefCell::new(ValueType { + bogus: bogus, + subtype: ValueTypeEnum::AnyList(ANY_LIST), + id, + })) + }) + } + // {"magic":"","directive":{"End":{"directive":"ignore-orig"}}} // {"magic":"","directive":{"Start":{"directive":"ignore-orig","tag":"value_type-struct-impl-new_char"}}} /// Inter a new ValueType in the store, and return it's `id`. pub fn new_char(bogus: bool, store: &mut LuDogVecTracyStore) -> Rc> {