feat: one more function to finish up

This commit is contained in:
Kasey White
2023-03-24 16:18:46 -04:00
committed by Lucas
parent 77afa76163
commit 25ff8acb1e
2 changed files with 150 additions and 131 deletions

View File

@@ -589,7 +589,7 @@ impl<'a> AirStack<'a> {
});
}
pub(crate) fn clause_guard(
pub fn clause_guard(
&self,
subject_name: impl ToString,
tipo: Arc<Type>,
@@ -608,4 +608,44 @@ impl<'a> AirStack<'a> {
self.merge_child(clause_then_stack);
}
pub fn list_expose(
&mut self,
tipo: Arc<Type>,
tail_head_names: Vec<(String, String)>,
tail: Option<(String, String)>,
value: AirStack,
) {
self.new_scope();
self.air.push(Air::ListExpose {
scope: self.scope.clone(),
tipo,
tail_head_names,
tail,
});
self.merge_child(value);
}
pub fn list_clause_guard(
&self,
tipo: Arc<Type>,
tail_name: impl ToString,
next_tail_name: Option<String>,
inverse: bool,
void_stack: AirStack,
) {
self.new_scope();
self.air.push(Air::ListClauseGuard {
scope: self.scope.clone(),
tipo,
tail_name: tail_name.to_string(),
next_tail_name,
inverse,
});
self.merge_child(void_stack);
}
}