513 Commits (master)
 

Author SHA1 Message Date
Tom Alexander 89c751e849
I think I need to implement iterating on the tree nodes. 4 years ago
Tom Alexander 3f49519bea
Initial structure for new implementation of walking functions using the heterogeneous tree. 4 years ago
Tom Alexander 456da98bed
Added an iter function which I think will let me automatically make iterators without having to explicitly take a reference to the tree. 4 years ago
Tom Alexander bebedf56e4
Implement IntoIterator for references to a BreadcrumbTreeNode. 4 years ago
Tom Alexander 1be60511ed
Implement an iterator over the tree. 4 years ago
Tom Alexander 645b251f13
Initial setup for a heterogenous tree of IntoContextElement. 4 years ago
Tom Alexander a578b57f12
Switch the call for IntoContextElement back to a static integer so it compiles again. 4 years ago
Tom Alexander 21b9e9282b
Ran into issue: Can't returned owned data when its expecting a trait object. 4 years ago
Tom Alexander 737c98d8b7
Add the renderer to calls to convert to a context element. 4 years ago
Tom Alexander 917da5a073
Put IntoContextElement everywhere. It compiles again. 4 years ago
Tom Alexander 975ab278ef
Starting an IntoContextElement trait to allow for delayed evaluation. 4 years ago
Tom Alexander 581f9f7e97
Update parser to treat all string rvalues as templates. 4 years ago
Tom Alexander 3352b777ae
Factor out the parsing of partial template names into its own parser for reuse as an rvalue. 4 years ago
Tom Alexander 4932a4bb6f
Add tests for reference parameters. 4 years ago
Tom Alexander 0236f882b7
Delete the old new_breadcrumbs function that is no longer used. 4 years ago
Tom Alexander d07ac3dcc9
Merge branch 'explicit_context_priority' into render 4 years ago
Tom Alexander e7c05f597f
Add a test proving exists does not support parameters. 4 years ago
Tom Alexander add77cf6a5
Get rid of the concept of NamedBlock and replace it with a ParameterizedBlock special case that does not support an else block. 4 years ago
Tom Alexander eb0eb8d4ca
Add priority tests for the other block types except helpers since I do not yet have a helper implemented that sets a value. 4 years ago
Tom Alexander 9bdc398a6d
Merge branch 'pseudo_context' into explicit_context_priority 4 years ago
Tom Alexander a0e2ba2b82
Had to update the 1-behind insertion for partial parameters to account for pseudo elements. 4 years ago
Tom Alexander 3c9a369908
Skipping over pseudo contexts has fixed most of the tests. 4 years ago
Tom Alexander f04e84dc31
Attempted to move section over to the section-specific new breadcrumbs function.
I think the problem is, the index context needs to be a higher priority than the new context element, but when referencing data with `{.}` the new context element needs to take priority. I could either combine entries in the context tree so that variables like $idx and $len live side-by-side with real context elements, or try to implement a way to skip over index context elements when walking up the tree.
4 years ago
Tom Alexander 79f52ecdee
Add test for priorities while looping and split the new_breadcrumbs function into two separate new_breadcrumbs functions because sections and partials have different orderings. 4 years ago
Tom Alexander 108cffb771
Fully replaced conditional's Container type with ParameterizedBlock. 4 years ago
Tom Alexander dc92973313
Switch parameterized blocks to having a Path for a name and taking a parser for a name matcher in the goal of merging with the conditional blocks. 4 years ago
Tom Alexander 2527baeff4
Pull the calls for the DustTag constructor up out of parameterized_block. 4 years ago
Tom Alexander 0ca17e0885
Add tests that prove that the priority between explicit contexts and parameters varies across sections and partials. 4 years ago
Tom Alexander 92ad15ff85
Merge branch 'explicit_context_setting' into render 4 years ago
Tom Alexander c78695d08e
Remove a TODO. 4 years ago
Tom Alexander 5b1e3c5fb0
Had to sort the input to the explicit_context_setting test because dustjs leaves the original order but serde_json sorts the keys. 4 years ago
Tom Alexander 25eb9b10a0
I did it backwards, I needed to use the explicit context from the block, not the inline partial. 4 years ago
Tom Alexander 6845df7f96
First attempt at an implementation of the new breadcrumbs for blocks/inline partials. 4 years ago
Tom Alexander 83623897af
Integrate new_breadcrumbs into the helpers. 4 years ago
Tom Alexander 400602124e
Added tests proving that the explicit context is evaluated using the global context of the partial containing the block (NOT the inline partial, which is where the explicit context is written). 4 years ago
Tom Alexander d02c98cb94
Add a special case to new_breadcrumbs for when theres an injected context but no explicit context or new context element and finish the partial integration. 4 years ago
Tom Alexander 4ce0899279
Expand the explicit context setting test to prove that injected_context gets inserted AFTER the current context when an explicit context is used. 4 years ago
Tom Alexander 17121aa85b
Integrated new_breadcrumbs into exists and not exists, and partially integrated it into partials. 4 years ago
Tom Alexander 32c047a9b9
Integrate the new_breadcrumbs function into sections. 4 years ago
Tom Alexander d79447e602
Update the new_breadcrumbs function to return an Option to prevent needlessly cloning the breadcrumbs when no new contexts are to be added. 4 years ago
Tom Alexander 4a21ae5af3
Add tests for explicit context setting that check failure conditions and implement a helper function to generate a new breadcrumb stack. 4 years ago
Tom Alexander 8121c93392
Make the dust template parser all_consuming. 4 years ago
Tom Alexander 5b2ac7c2c2
Add parser support for explicit contexts in helpers. 4 years ago
Tom Alexander 12de0245c5
Implemented parser support for explicit contexts in partials. 4 years ago
Tom Alexander 9031108d2a
Implemented parsing for explicit contexts in NamedBlocks. 4 years ago
Tom Alexander dbee569931
Finish adding explicit context to the parser for Container. 4 years ago
Tom Alexander 1152ff9974
Greatly expand the explicit_context_setting test.
Turns out explicit context setting works in a lot more places than the official dustjs pages indicate. Also some things don't make much sense (like setting it on a block works but not on an inline partial).
4 years ago
Tom Alexander e27ab16e06
Add a test for explicit context setting. 4 years ago
Tom Alexander d813a878ca
Merge branch 'idx_and_len' into render 4 years ago
Tom Alexander c09393da80
Switch the renderer over to using the new is_truthy value and add the injection of $idx and $len into the context tree. 4 years ago