summaryrefslogtreecommitdiff
path: root/src/eval
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval')
-rw-r--r--src/eval/mod.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/eval/mod.rs b/src/eval/mod.rs
index 2023004f..a8c6c688 100644
--- a/src/eval/mod.rs
+++ b/src/eval/mod.rs
@@ -390,6 +390,9 @@ impl Eval for Expr {
Self::For(v) => v.eval(ctx),
Self::Import(v) => v.eval(ctx),
Self::Include(v) => v.eval(ctx),
+ Self::Break(v) => v.eval(ctx),
+ Self::Continue(v) => v.eval(ctx),
+ Self::Return(v) => v.eval(ctx),
}
}
}
@@ -905,6 +908,30 @@ impl Eval for IncludeExpr {
}
}
+impl Eval for BreakExpr {
+ type Output = Value;
+
+ fn eval(&self, _: &mut EvalContext) -> TypResult<Self::Output> {
+ Err("break is not yet implemented").at(self.span())
+ }
+}
+
+impl Eval for ContinueExpr {
+ type Output = Value;
+
+ fn eval(&self, _: &mut EvalContext) -> TypResult<Self::Output> {
+ Err("continue is not yet implemented").at(self.span())
+ }
+}
+
+impl Eval for ReturnExpr {
+ type Output = Value;
+
+ fn eval(&self, _: &mut EvalContext) -> TypResult<Self::Output> {
+ Err("return is not yet implemented").at(self.span())
+ }
+}
+
/// Try to mutably access the value an expression points to.
///
/// This only works if the expression is a valid lvalue.