ast: Remove unary hash operator to reserve the symbol for use in attribute parsing
This commit is contained in:
parent
cdf283064e
commit
59b73f314a
@ -367,8 +367,6 @@ pub enum UnaryKind {
|
||||
/// Unused
|
||||
At,
|
||||
/// Unused
|
||||
Hash,
|
||||
/// Unused
|
||||
Tilde,
|
||||
}
|
||||
|
||||
|
@ -367,7 +367,6 @@ mod display {
|
||||
UnaryKind::Neg => "-",
|
||||
UnaryKind::Not => "!",
|
||||
UnaryKind::At => "@",
|
||||
UnaryKind::Hash => "#",
|
||||
UnaryKind::Tilde => "~",
|
||||
}
|
||||
.fmt(f)
|
||||
|
@ -551,8 +551,7 @@ pub mod interpret {
|
||||
UnaryKind::Deref => todo!("Deref operator"),
|
||||
UnaryKind::Neg => (-operand)?,
|
||||
UnaryKind::Not => (!operand)?,
|
||||
UnaryKind::At => unimplemented!("At operator"),
|
||||
UnaryKind::Hash => {
|
||||
UnaryKind::At => {
|
||||
println!("{operand}");
|
||||
operand
|
||||
}
|
||||
|
@ -1215,7 +1215,6 @@ impl<'t> Parser<'t> {
|
||||
Minus => Neg, // -
|
||||
Bang => Not, // !
|
||||
At => At, // @
|
||||
Hash => Hash, // #
|
||||
Tilde => Tilde, // ~
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user