Implement SimpleExpr logic for configuration parsing

We can now use boolean, lists & all in configuration.
This commit is contained in:
microproofs
2024-08-16 22:04:20 -04:00
committed by KtorZ
parent f674f9ee97
commit f35afe8d65
2 changed files with 69 additions and 21 deletions

View File

@@ -1259,6 +1259,19 @@ impl Annotation {
}
}
pub fn list(inner: Annotation, location: Span) -> Self {
Annotation::Constructor {
name: "List".to_string(),
module: None,
arguments: vec![inner],
location,
}
}
pub fn tuple(elems: Vec<Annotation>, location: Span) -> Self {
Annotation::Tuple { elems, location }
}
pub fn is_logically_equal(&self, other: &Annotation) -> bool {
match self {
Annotation::Constructor {