Starting a context for partial parameters.
This commit is contained in:
parent
f240b877b8
commit
1a6db195cb
@ -6,6 +6,7 @@ pub use parser::template;
|
||||
pub use parser::Body;
|
||||
pub use parser::DustTag;
|
||||
pub use parser::Filter;
|
||||
pub use parser::RValue;
|
||||
pub use parser::Special;
|
||||
pub use parser::Template;
|
||||
pub use parser::TemplateElement;
|
||||
|
@ -119,7 +119,7 @@ pub struct Partial<'a> {
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
enum RValue<'a> {
|
||||
pub enum RValue<'a> {
|
||||
RVPath(Path<'a>),
|
||||
RVString(String),
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
use crate::parser::template;
|
||||
use crate::parser::Body;
|
||||
use crate::parser::DustTag;
|
||||
use crate::parser::RValue;
|
||||
use crate::parser::Special;
|
||||
use crate::parser::Template;
|
||||
use crate::parser::TemplateElement;
|
||||
@ -253,6 +254,11 @@ fn walk_path<'a>(
|
||||
})
|
||||
}
|
||||
|
||||
struct ParametersContext<'a> {
|
||||
params: HashMap<&'a str, RValue<'a>>,
|
||||
breadcrumbs: &'a Vec<&'a dyn ContextElement>,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
Loading…
x
Reference in New Issue
Block a user