feat: Emit keyword
This commit is contained in:
@@ -530,6 +530,14 @@ impl<'a> CodeGenerator<'a> {
|
||||
self.build(then, module_build_name, &[]),
|
||||
),
|
||||
|
||||
TypedExpr::Emit {
|
||||
tipo, then, text, ..
|
||||
} => AirTree::emit(
|
||||
self.build(text, module_build_name, &[]),
|
||||
tipo.clone(),
|
||||
self.build(then, module_build_name, &[]),
|
||||
),
|
||||
|
||||
TypedExpr::When {
|
||||
tipo,
|
||||
subject,
|
||||
@@ -5310,6 +5318,15 @@ impl<'a> CodeGenerator<'a> {
|
||||
|
||||
Some(term)
|
||||
}
|
||||
Air::Emit { .. } => {
|
||||
let text = arg_stack.pop().unwrap();
|
||||
|
||||
let term = arg_stack.pop().unwrap();
|
||||
|
||||
let term = term.delayed_trace(text);
|
||||
|
||||
Some(term)
|
||||
}
|
||||
Air::ErrorTerm { validator, .. } => {
|
||||
if validator {
|
||||
Some(Term::Error.apply(Term::Error.force()))
|
||||
|
||||
Reference in New Issue
Block a user