aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornic-gaffney <gaffney_nic@protonmail.com>2023-09-13 02:35:48 -0500
committernic-gaffney <gaffney_nic@protonmail.com>2023-09-13 02:35:48 -0500
commit2ab284b39ba2abd05d4cbc1da74582329ab84807 (patch)
tree2065f21a26448e580a49a92c53b6860512395d70
parentb81d5efb177d40e712becf84063ea3c36ae083e1 (diff)
downloadsloth-2ab284b39ba2abd05d4cbc1da74582329ab84807.tar.gz
structs
-rw-r--r--sloth/src/parser/ast.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/sloth/src/parser/ast.rs b/sloth/src/parser/ast.rs
index e93dcdb..f830761 100644
--- a/sloth/src/parser/ast.rs
+++ b/sloth/src/parser/ast.rs
@@ -436,9 +436,8 @@ impl Display for BinaryOp {
pub enum UnaryOp {
Not,
Neg,
-
- Reference,
- Dereference,
+ // Reference,
+ // Dereference,
}
impl TryFrom<TokenType> for UnaryOp {
@@ -449,9 +448,8 @@ impl TryFrom<TokenType> for UnaryOp {
TokenType::Bang => Self::Not,
TokenType::Minus => Self::Neg,
- TokenType::Star => Self::Reference,
- TokenType::At => Self::Dereference,
-
+ // TokenType::Star => Self::Reference,
+ // TokenType::At => Self::Dereference,
_ => return Err(ParsingError::InvalidOp),
};
@@ -464,9 +462,8 @@ impl Display for UnaryOp {
let value = match self {
UnaryOp::Not => "!",
UnaryOp::Neg => "-",
-
- UnaryOp::Reference => "*",
- UnaryOp::Dereference => "@",
+ // UnaryOp::Reference => "*",
+ // UnaryOp::Dereference => "@",
};
write!(f, "{value}")