Tag types (#7458)
* Replace tag type with tagIdent and tagDecl Signed-off-by: Nick Cameron <nrc@ncameron.org> * Replace tagIdent with TaggedEdge and TaggedFace Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -223,7 +223,7 @@ impl PrimitiveType {
|
||||
PrimitiveType::String => hasher.update(b"string"),
|
||||
PrimitiveType::Number(suffix) => hasher.update(suffix.digestable_id()),
|
||||
PrimitiveType::Boolean => hasher.update(b"bool"),
|
||||
PrimitiveType::Tag => hasher.update(b"tag"),
|
||||
PrimitiveType::TagDecl => hasher.update(b"TagDecl"),
|
||||
PrimitiveType::ImportedGeometry => hasher.update(b"ImportedGeometry"),
|
||||
PrimitiveType::Function(f) => hasher.update(f.compute_digest()),
|
||||
}
|
||||
|
@ -3151,8 +3151,8 @@ pub enum PrimitiveType {
|
||||
/// A boolean type.
|
||||
#[serde(rename = "bool")]
|
||||
Boolean,
|
||||
/// A tag.
|
||||
Tag,
|
||||
/// A tag declaration.
|
||||
TagDecl,
|
||||
/// Imported from other CAD system.
|
||||
ImportedGeometry,
|
||||
/// `fn`, type of functions.
|
||||
@ -3167,7 +3167,7 @@ impl PrimitiveType {
|
||||
("any", None) => Some(PrimitiveType::Any),
|
||||
("string", None) => Some(PrimitiveType::String),
|
||||
("bool", None) => Some(PrimitiveType::Boolean),
|
||||
("tag", None) => Some(PrimitiveType::Tag),
|
||||
("TagDecl", None) => Some(PrimitiveType::TagDecl),
|
||||
("number", None) => Some(PrimitiveType::Number(NumericSuffix::None)),
|
||||
("number", Some(s)) => Some(PrimitiveType::Number(s)),
|
||||
("ImportedGeometry", None) => Some(PrimitiveType::ImportedGeometry),
|
||||
@ -3184,7 +3184,7 @@ impl PrimitiveType {
|
||||
PrimitiveType::ImportedGeometry => "imported geometries".to_owned(),
|
||||
PrimitiveType::Function(_) => "functions".to_owned(),
|
||||
PrimitiveType::Named { id } => format!("`{}`s", id.name),
|
||||
PrimitiveType::Tag => "tags".to_owned(),
|
||||
PrimitiveType::TagDecl => "tag declarations".to_owned(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3202,7 +3202,7 @@ impl fmt::Display for PrimitiveType {
|
||||
}
|
||||
PrimitiveType::String => write!(f, "string"),
|
||||
PrimitiveType::Boolean => write!(f, "bool"),
|
||||
PrimitiveType::Tag => write!(f, "tag"),
|
||||
PrimitiveType::TagDecl => write!(f, "TagDecl"),
|
||||
PrimitiveType::ImportedGeometry => write!(f, "ImportedGeometry"),
|
||||
PrimitiveType::Function(t) => {
|
||||
write!(f, "fn")?;
|
||||
|
Reference in New Issue
Block a user