Skipping over pseudo contexts has fixed most of the tests.

This commit is contained in:
Tom Alexander
2020-05-30 11:50:55 -04:00
parent f04e84dc31
commit 3c9a369908
4 changed files with 46 additions and 11 deletions

View File

@@ -21,6 +21,16 @@ pub trait Truthiness {
pub trait Walkable {
fn walk(&self, segment: &str) -> Result<&dyn ContextElement, WalkError>;
/// If an element contains meta information and should not be
/// returned as the final result of a walk, this function should
/// return true.
///
/// For example, the iteration context contains $idx and $len but
/// it should not be the result of a dot-reference like `{.}`.
fn is_pseudo_element(&self) -> bool {
false
}
}
pub trait Renderable {