From d7f0147a4f5fbebf34f459e71c252ad410a69faf Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 28 Oct 2018 12:45:45 -0700 Subject: [PATCH] Add conditional target placeholder expr --- schala-lang/language/src/eval.rs | 3 ++- schala-lang/language/src/reduced_ast.rs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/schala-lang/language/src/eval.rs b/schala-lang/language/src/eval.rs index 735be43..66b3a7e 100644 --- a/schala-lang/language/src/eval.rs +++ b/schala-lang/language/src/eval.rs @@ -194,7 +194,8 @@ impl<'a> State<'a> { Assign { box val, box expr } => self.assign_expression(val, expr), Unit => Ok(Node::Expr(Unit)), CaseMatch { box cond, alternatives } => self.case_match_expression(cond, alternatives), - UnimplementedSigilValue => Err(format!("Sigil value eval not implemented")) + ConditionalTargetPlaceholder => Err(format!("This value shouldn't exist here")), + UnimplementedSigilValue => Err(format!("Sigil value eval not implemented")), } } } diff --git a/schala-lang/language/src/reduced_ast.rs b/schala-lang/language/src/reduced_ast.rs index 15b5e18..d37a592 100644 --- a/schala-lang/language/src/reduced_ast.rs +++ b/schala-lang/language/src/reduced_ast.rs @@ -48,6 +48,7 @@ pub enum Expr { then_clause: Vec, else_clause: Vec, }, + ConditionalTargetPlaceholder, CaseMatch { cond: Box, alternatives: Vec