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
|
/// Unused
|
||||||
At,
|
At,
|
||||||
/// Unused
|
/// Unused
|
||||||
Hash,
|
|
||||||
/// Unused
|
|
||||||
Tilde,
|
Tilde,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -367,7 +367,6 @@ mod display {
|
|||||||
UnaryKind::Neg => "-",
|
UnaryKind::Neg => "-",
|
||||||
UnaryKind::Not => "!",
|
UnaryKind::Not => "!",
|
||||||
UnaryKind::At => "@",
|
UnaryKind::At => "@",
|
||||||
UnaryKind::Hash => "#",
|
|
||||||
UnaryKind::Tilde => "~",
|
UnaryKind::Tilde => "~",
|
||||||
}
|
}
|
||||||
.fmt(f)
|
.fmt(f)
|
||||||
|
@ -551,8 +551,7 @@ pub mod interpret {
|
|||||||
UnaryKind::Deref => todo!("Deref operator"),
|
UnaryKind::Deref => todo!("Deref operator"),
|
||||||
UnaryKind::Neg => (-operand)?,
|
UnaryKind::Neg => (-operand)?,
|
||||||
UnaryKind::Not => (!operand)?,
|
UnaryKind::Not => (!operand)?,
|
||||||
UnaryKind::At => unimplemented!("At operator"),
|
UnaryKind::At => {
|
||||||
UnaryKind::Hash => {
|
|
||||||
println!("{operand}");
|
println!("{operand}");
|
||||||
operand
|
operand
|
||||||
}
|
}
|
||||||
|
@ -1215,7 +1215,6 @@ impl<'t> Parser<'t> {
|
|||||||
Minus => Neg, // -
|
Minus => Neg, // -
|
||||||
Bang => Not, // !
|
Bang => Not, // !
|
||||||
At => At, // @
|
At => At, // @
|
||||||
Hash => Hash, // #
|
|
||||||
Tilde => Tilde, // ~
|
Tilde => Tilde, // ~
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user