From fb1e185739e54aa535276773df1b29bf17977e40 Mon Sep 17 00:00:00 2001 From: Nadir Fejzic Date: Sun, 24 Dec 2023 20:37:55 +0100 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20add=20constructor=20for=20the=20nor?= =?UTF-8?q?m=20(`=E2=88=A5`)=20operator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/elements/mo/dict.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/elements/mo/dict.rs b/src/elements/mo/dict.rs index b3004f7..2cb8680 100644 --- a/src/elements/mo/dict.rs +++ b/src/elements/mo/dict.rs @@ -416,6 +416,11 @@ impl Operator { Self::from("\u{007C}") } + /// Create a '∥' operator. + pub fn norm() -> Self { + Self::from("\u{2225}") + } + /// Create a '^' operator. pub fn hat() -> Self { Self::from("\u{005E}") From 5706ae9ba7ceb27b41e5caca225f2fc68a4b7ef0 Mon Sep 17 00:00:00 2001 From: Nadir Fejzic Date: Tue, 26 Dec 2023 19:22:39 +0100 Subject: [PATCH 2/2] feat: add more operator constructors --- src/elements/mo/dict.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/elements/mo/dict.rs b/src/elements/mo/dict.rs index 2cb8680..23cf8e3 100644 --- a/src/elements/mo/dict.rs +++ b/src/elements/mo/dict.rs @@ -16,6 +16,11 @@ impl Operator { Self::from("\u{22C5}") } + /// Create a '¨' operator. + pub fn double_dot() -> Self { + Self::from("\u{00A8}") + } + /// Create a '∗' operator. pub fn asterisk() -> Self { Self::from("\u{2217}") @@ -191,6 +196,11 @@ impl Operator { Self::from("\u{2309}") } + /// Create a '≔' operator. + pub fn assign() -> Self { + Self::from("\u{2254}") + } + /// Create a '=' operator. pub fn eq() -> Self { Self::from("\u{003D}") @@ -450,4 +460,9 @@ impl Operator { pub fn larrow() -> Self { Self::from("\u{2190}") } + + /// Create a '~' operator. + pub fn tilde() -> Self { + Self::from("\u{007E}") + } }