Simplifying PR per reviewers request

This commit is contained in:
Micah Kendall
2024-04-01 23:17:50 +11:00
committed by Lucas
parent d39dbd6697
commit ff4ddfbe1b
6 changed files with 11 additions and 91 deletions

View File

@@ -39,7 +39,8 @@ pub fn parser<'a>(
just(Token::Emit)
.ignore_then(choice((string::hybrid(), expression.clone())))
.then(sequence.clone().or_not())
.map_with_span(|(text, then_), span| UntypedExpr::Emit {
.map_with_span(|(text, then_), span| UntypedExpr::Trace {
kind: TraceKind::Emit,
location: span,
then: Box::new(then_.unwrap_or_else(|| UntypedExpr::todo(None, span))),
text: Box::new(text),