pub mod tag_names { pub const STRING: &str = "string"; pub const BOOL: &str = "bool"; pub const INT: &str = "int"; pub const FLOAT: &str = "float"; pub const DICT: &str = "dict"; pub const LIST: &str = "list"; pub const TAG_COLLECTION: &str = "tag-collection"; pub const TYPE_DECLARATION: &str = "type-declaration"; pub const TYPE_STRING: &str = "type-string"; pub const TYPE_INT: &str = "type-int"; pub const TYPE_FLOAT: &str = "type-float"; pub const TYPE_BOOL: &str = "type-bool"; pub const TYPE_TENSOR: &str = "type-tensor"; pub const TYPE_NAMED_VALUE_COLLECTION: &str = "type-named-value-collection"; pub const TYPE_LIST: &str = "type-list"; pub const TYPE_TUPLE: &str = "type-tuple"; pub const NAMED_FIELD: &str = "named-field"; pub const TYPE_NAMED_VALUE: &str = "type-named-value"; pub const CONDENSED_TAGS: &str = "condensed-tags"; pub const DIM: &str = "dim"; pub const LOGICAL: &str = "logical"; } pub mod literal_constants { use lazy_static::lazy_static; use std::collections::HashSet; use maplit::hashset; lazy_static! { pub static ref BOOL_TRUE_LITERALS: HashSet<&'static str> = { hashset! { "TRUE", "true", "True", "1", } }; } lazy_static! { pub static ref BOOL_FALSE_LITERALS: HashSet<&'static str> = { hashset! { "FALSE", "false", "False", "0", } }; } } pub mod attribute_names { pub const NAME: &str = "name"; pub const FILTER: &str = "filter"; } use lazy_static::lazy_static; use std::collections::HashSet; use maplit::hashset; lazy_static! { pub static ref TYPE_DECLARATION_ELEMENT_TAGS: HashSet<&'static str> = { hashset! { tag_names::TYPE_STRING, tag_names::TYPE_INT, tag_names::TYPE_FLOAT, tag_names::TYPE_BOOL, tag_names::TYPE_TENSOR, tag_names::TYPE_NAMED_VALUE_COLLECTION, tag_names::TYPE_LIST, tag_names::TYPE_TUPLE, } }; }