From 18c168706441a9973d0934e0906cd980bd77ab4c Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 6 Jun 2020 18:15:11 -0400 Subject: [PATCH] Starting the constructor for ParametersContext. --- src/renderer/parameters_context.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/renderer/parameters_context.rs b/src/renderer/parameters_context.rs index c92c7a7..d703408 100644 --- a/src/renderer/parameters_context.rs +++ b/src/renderer/parameters_context.rs @@ -30,7 +30,17 @@ impl<'a> ParametersContext<'a> { breadcrumbs: Option<&BreadcrumbTree>, params: &Vec, ) -> Self { - todo!() + // If the parameter is a Path, then we resolve it immediately + // to a context element because those are resolved using the + // breadcrumbs at the time of assignment. + // + // If the parameter is a template (for example `foo="{bar}"`) + // then those are resolved at the time of access rather than + // the time of assignment, so we leave them into their + // original IntoContextElement state. + ParametersContext { + params: HashMap::new(), + } } }