Add conditional target placeholder expr

This commit is contained in:
greg 2018-10-28 12:45:45 -07:00
parent f883512882
commit d7f0147a4f
2 changed files with 3 additions and 1 deletions

View File

@ -194,7 +194,8 @@ impl<'a> State<'a> {
Assign { box val, box expr } => self.assign_expression(val, expr), Assign { box val, box expr } => self.assign_expression(val, expr),
Unit => Ok(Node::Expr(Unit)), Unit => Ok(Node::Expr(Unit)),
CaseMatch { box cond, alternatives } => self.case_match_expression(cond, alternatives), 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")),
} }
} }
} }

View File

@ -48,6 +48,7 @@ pub enum Expr {
then_clause: Vec<Stmt>, then_clause: Vec<Stmt>,
else_clause: Vec<Stmt>, else_clause: Vec<Stmt>,
}, },
ConditionalTargetPlaceholder,
CaseMatch { CaseMatch {
cond: Box<Expr>, cond: Box<Expr>,
alternatives: Vec<Alternative> alternatives: Vec<Alternative>