blob: 7c02d954cb1dce61c13e53171b2fc54de1e3d2d9 [file] [log] [blame]
use crate::block::BlockContext;
use crate::json::value::PathAndJson;
pub(crate) fn create_block<'rc>(param: &PathAndJson<'rc>) -> BlockContext<'rc> {
let mut block = BlockContext::new();
if let Some(new_path) = param.context_path() {
*block.base_path_mut() = new_path.clone();
} else {
// use clone for now
block.set_base_value(param.value().clone());
}
block
}