pub_just/set.rs
1use super::*;
2
3#[derive(Debug, Clone)]
4pub struct Set<'src> {
5 pub name: Name<'src>,
6 pub value: Setting<'src>,
7}
8
9impl<'src> Keyed<'src> for Set<'src> {
10 fn key(&self) -> &'src str {
11 self.name.lexeme()
12 }
13}
14
15impl<'src> Display for Set<'src> {
16 fn fmt(&self, f: &mut Formatter) -> fmt::Result {
17 write!(f, "set {} := {}", self.name, self.value)
18 }
19}