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

difftreelog

feat(evaluator) add std.trace intristic

Лач2020-06-06parent: #be9904a.patch.diff
in: master

1 file changed

modifiedcrates/jsonnet-evaluator/src/evaluate.rsdiffbeforeafterboth
496 panic!("bad floor call");496 panic!("bad floor call");
497 }497 }
498 }498 }
499 ("std", "trace") => {
500 assert_eq!(args.len(), 2);
501 if let (Val::Str(a), b) = (
502 evaluate(context.clone(), &args[0].1)?,
503 evaluate(context, &args[1].1)?,
504 ) {
505 println!("{}", a);
506 b
507 } else {
508 panic!("bad trace call");
509 }
510 }
499 (ns, name) => panic!("Intristic not found: {}.{}", ns, name),511 (ns, name) => panic!("Intristic not found: {}.{}", ns, name),
500 },512 },
501 Val::Func(f) => push(locexpr, "function call".to_owned(), || {513 Val::Func(f) => push(locexpr, "function call".to_owned(), || {