git.delta.rocks / jrsonnet / refs/commits / f38d2641700b

difftreelog

refactor split evaluation code

Yaroslav Bolyukin2021-07-04parent: #8d08861.patch.diff
in: master

5 files changed

deletedcrates/jrsonnet-evaluator/src/evaluate.rsdiffbeforeafterboth

no changes

addedcrates/jrsonnet-evaluator/src/evaluate/mod.rsdiffbeforeafterboth

no changes

addedcrates/jrsonnet-evaluator/src/evaluate/operator.rsdiffbeforeafterboth

no changes

modifiedcrates/jrsonnet-evaluator/src/lib.rsdiffbeforeafterboth
1029 let error = state1029 let error = state
1030 .evaluate_snippet_raw(1030 .evaluate_snippet_raw(
1031 PathBuf::from("issue40.jsonnet").into(),1031 PathBuf::from("issue40.jsonnet").into(),
1032 r#"1032 r#"
1033 local conf = {1033 local conf = {
1034 n: ""1034 n: ""
1035 };1035 };
1036 1036
1037 local result = conf + {1037 local result = conf + {
1038 assert std.isNumber(self.n): "is number"1038 assert std.isNumber(self.n): "is number"
1039 };1039 };
10401040
1041 std.manifestJsonEx(result, "")1041 std.manifestJsonEx(result, "")
1042 "#1042 "#
1043 .into(),1043 .into(),
1044 )1044 )
1045 .unwrap_err();1045 .unwrap_err();
modifiedcrates/jrsonnet-evaluator/src/obj.rsdiffbeforeafterboth
1use crate::operator::evaluate_add_op;
1use crate::{evaluate_add_op, LazyBinding, Result, Val};2use crate::{LazyBinding, Result, Val};
2use jrsonnet_gc::{Gc, GcCell, Trace};3use jrsonnet_gc::{Gc, GcCell, Trace};
3use jrsonnet_interner::IStr;4use jrsonnet_interner::IStr;
4use jrsonnet_parser::{ExprLocation, Visibility};5use jrsonnet_parser::{ExprLocation, Visibility};