Add a new trait to ContextElement for Truthiness.

Before I was relying on Loopable to both determine truthiness and get a list of elements to loop over. This will no longer work since I need to only set $idx and $len when iterating over actual arrays, as opposed to all truthy values, so I've finally made truthiness explicit.
This commit is contained in:
Tom Alexander
2020-05-24 16:16:43 -04:00
parent 055d88984e
commit 59ee4f508f
6 changed files with 74 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ pub use context_element::CompareContextElement;
pub use context_element::ContextElement;
pub use context_element::Loopable;
pub use context_element::Renderable;
pub use context_element::Truthiness;
pub use context_element::Walkable;
pub use errors::CompileError;
pub use errors::RenderError;