Commit Graph

  • 250d428464 Updated Partial for the new architecture. Tom Alexander 2020-06-06 23:17:50 -04:00
  • b396765488 Updated Exists/NotExists for the new architecture. Tom Alexander 2020-06-06 23:15:12 -04:00
  • e28ebaf26a Update IterationContext to be an IntoContextElement and finish implementing section. Tom Alexander 2020-06-06 23:08:21 -04:00
  • 00699b84ba Finished converting back to Vec. Tom Alexander 2020-06-06 22:45:58 -04:00
  • b0efe50410 Fixed new_breadcrumbs_section for the Vec based breadcrumbs. Tom Alexander 2020-06-06 22:37:29 -04:00
  • 256dcd03c5 Fixed tree_walking for the new breadcrumbs. Tom Alexander 2020-06-06 22:29:39 -04:00
  • 71592a9a32 Switching back to a Vec because inserting multiple elements into the linked list structure while maintaining ownership of each node proved to be difficult. Tom Alexander 2020-06-06 22:24:27 -04:00
  • 78bffb5f04 I think I need to switch back to a vec. Tom Alexander 2020-06-06 21:46:02 -04:00
  • 77b842f8de Implement IntoContextElement for ParametersContext. Tom Alexander 2020-06-06 20:48:29 -04:00
  • 02259b9bd6 Create from_borrowed and from_owned constructors for IceResult and BreadcrumbTreeElement. Tom Alexander 2020-06-06 20:24:01 -04:00
  • 3c15e35b67 Finished constructor for ParametersContext. Tom Alexander 2020-06-06 20:02:50 -04:00
  • ed7d80de6c Handling RVPath for ParametersContext constructor. Tom Alexander 2020-06-06 19:57:33 -04:00
  • f9dea70d23 Implement conversion from IceResult into BreadcrumbTreeNode. Tom Alexander 2020-06-06 19:39:44 -04:00
  • 7253c7d99e Implement function to convert IceResult into a BreadcrumbTreeElement. Tom Alexander 2020-06-06 18:37:35 -04:00
  • 18c1687064 Starting the constructor for ParametersContext. Tom Alexander 2020-06-06 18:15:11 -04:00
  • f4f309caad Working implementation of into_context_element for RValue. Tom Alexander 2020-06-06 18:10:30 -04:00
  • c5b927ca11 Fix bug in use of breadcrumbs in new_breadcrumbs_partial. Tom Alexander 2020-06-06 17:56:54 -04:00
  • e725728a65 I think I have solved the lifetime issue. Tom Alexander 2020-06-06 17:52:46 -04:00
  • adbc236836 Broke the problem area down into parts to make it easier to debug. Tom Alexander 2020-06-06 16:03:02 -04:00
  • 842f39e178 Minor syntax fix. Tom Alexander 2020-06-06 15:20:43 -04:00
  • 303f092c30 Running into lifetime issues again. Tom Alexander 2020-05-31 23:47:20 -04:00
  • da15439946 Start of IceResult to return owned values from into_context_element. Tom Alexander 2020-05-31 23:29:12 -04:00
  • 7789e6245d I need to be able to returned owned data from into_context_element. Tom Alexander 2020-05-31 22:35:46 -04:00
  • 064027e77b Worked around a lifetime issue with into_context_element. Tom Alexander 2020-05-31 22:31:05 -04:00
  • b74dc394a8 Switched to returning an Option for into_context_element(). Tom Alexander 2020-05-31 22:17:58 -04:00
  • 3aaf7f9987 I think I need to make into_context_element return an Option. Tom Alexander 2020-05-31 22:06:12 -04:00
  • 09e0b046a0 Copy over the implementation of ContextElement for OwnedLiteral which will be the result of calling IntoContextElement on RValues. Tom Alexander 2020-05-31 21:59:24 -04:00
  • ff74d78fdb Starting the new parameters context object. Tom Alexander 2020-05-31 21:46:00 -04:00
  • 7bf8012d6e Need to mix back in parameterscontext. Tom Alexander 2020-05-31 21:30:36 -04:00
  • bbc1a24631 Added back in reference. Tom Alexander 2020-05-31 21:26:31 -04:00
  • da6655d4b6 General structure to the rendering code. Tom Alexander 2020-05-31 21:18:54 -04:00
  • 680fc167ea Turns out it was just a lifetime issue. Tom Alexander 2020-05-31 20:43:07 -04:00
  • 2b8894f9c2 Most of new_breadcrumbs_partial, just need to get the return working. Tom Alexander 2020-05-31 20:41:27 -04:00
  • 6bde22b667 Re-enabled compiling templates from bin.rs. Tom Alexander 2020-05-31 19:08:10 -04:00
  • f1ec0ffb9e Got rid of most of the Clone traits on the parser types since some of the parser results now contain owned values rather than just references. Tom Alexander 2020-05-31 19:01:51 -04:00
  • 15c8e3bf28 Get rid of the CloneIntoBoxedContextElement trait for now because I don't know if its still going to be necessary with this overhaul. Tom Alexander 2020-05-31 18:31:49 -04:00
  • b8b4759d45 Remove iteration_context, parameters_context, and most of bin.rs. Tom Alexander 2020-05-31 18:27:55 -04:00
  • acb8dfb58e Replaced the old renderer file with a new renderer file. Tom Alexander 2020-05-31 18:18:21 -04:00
  • 283430a45b Merge the breadcrumb tree trait and struct into just a struct. Tom Alexander 2020-05-31 18:14:26 -04:00
  • 439601bbb5 First I'll try to eliminate the duplication between the BreadcrumbTree and BreadcrumbTreeNode. Tom Alexander 2020-05-31 18:05:49 -04:00
  • 1111b48270 Due to traits I am going to have to start hard-replacing the old renderer file. Tom Alexander 2020-05-31 18:02:02 -04:00
  • de5914417e All but explicit context for new_breadcrumbs_section. Tom Alexander 2020-05-31 17:56:07 -04:00
  • b381789422 Slight progress on new_breadcrumbs_section. Tom Alexander 2020-05-31 17:32:06 -04:00
  • 2b532e7eb4 Going to try switching to boxed owned values to remove the template. Tom Alexander 2020-05-31 17:25:41 -04:00
  • 92dca74505 Running into issue where I need to know the type to create new tree node elements. Tom Alexander 2020-05-31 16:40:39 -04:00
  • ff27c2c85d Basic structure for the new tree renderer. Tom Alexander 2020-05-31 16:21:13 -04:00
  • 65445cc8fc Finished implementing the new tree walking. Tom Alexander 2020-05-31 16:16:21 -04:00
  • 863744c42d Got rid of the IceTreeIterator by using map(). Tom Alexander 2020-05-31 16:02:30 -04:00
  • 781b8f645a Switch IntoIter over to the breadcrumb iterator. Tom Alexander 2020-05-31 15:58:29 -04:00
  • ff13d22ab6 Renamed BreadcrumbTreeIterator to IceTreeIterator. Tom Alexander 2020-05-31 15:52:46 -04:00
  • 89c751e849 I think I need to implement iterating on the tree nodes. Tom Alexander 2020-05-31 15:51:18 -04:00
  • 3f49519bea Initial structure for new implementation of walking functions using the heterogeneous tree. Tom Alexander 2020-05-31 15:44:09 -04:00
  • 456da98bed Added an iter function which I think will let me automatically make iterators without having to explicitly take a reference to the tree. Tom Alexander 2020-05-31 14:29:59 -04:00
  • bebedf56e4 Implement IntoIterator for references to a BreadcrumbTreeNode. Tom Alexander 2020-05-31 14:27:31 -04:00
  • 1be60511ed Implement an iterator over the tree. Tom Alexander 2020-05-31 14:17:21 -04:00
  • 645b251f13 Initial setup for a heterogenous tree of IntoContextElement. Tom Alexander 2020-05-31 13:52:20 -04:00
  • a578b57f12 Switch the call for IntoContextElement back to a static integer so it compiles again. Tom Alexander 2020-05-31 13:21:47 -04:00
  • 21b9e9282b Ran into issue: Can't returned owned data when its expecting a trait object. Tom Alexander 2020-05-30 18:28:33 -04:00
  • 737c98d8b7 Add the renderer to calls to convert to a context element. Tom Alexander 2020-05-30 18:16:58 -04:00
  • 917da5a073 Put IntoContextElement everywhere. It compiles again. Tom Alexander 2020-05-30 17:50:27 -04:00
  • 975ab278ef Starting an IntoContextElement trait to allow for delayed evaluation. Tom Alexander 2020-05-30 16:34:32 -04:00
  • 581f9f7e97 Update parser to treat all string rvalues as templates. Tom Alexander 2020-05-30 15:49:13 -04:00
  • 3352b777ae Factor out the parsing of partial template names into its own parser for reuse as an rvalue. Tom Alexander 2020-05-30 15:45:44 -04:00
  • 4932a4bb6f Add tests for reference parameters. Tom Alexander 2020-05-30 15:20:54 -04:00
  • 0236f882b7 Delete the old new_breadcrumbs function that is no longer used. Tom Alexander 2020-05-30 14:45:48 -04:00
  • d07ac3dcc9 Merge branch 'explicit_context_priority' into render Tom Alexander 2020-05-30 14:43:23 -04:00
  • e7c05f597f Add a test proving exists does not support parameters. Tom Alexander 2020-05-30 14:42:34 -04:00
  • add77cf6a5 Get rid of the concept of NamedBlock and replace it with a ParameterizedBlock special case that does not support an else block. Tom Alexander 2020-05-30 14:39:31 -04:00
  • eb0eb8d4ca Add priority tests for the other block types except helpers since I do not yet have a helper implemented that sets a value. Tom Alexander 2020-05-30 13:47:13 -04:00
  • 9bdc398a6d Merge branch 'pseudo_context' into explicit_context_priority Tom Alexander 2020-05-30 12:26:11 -04:00
  • a0e2ba2b82 Had to update the 1-behind insertion for partial parameters to account for pseudo elements. Tom Alexander 2020-05-30 12:24:50 -04:00
  • 3c9a369908 Skipping over pseudo contexts has fixed most of the tests. Tom Alexander 2020-05-30 11:50:55 -04:00
  • f04e84dc31 Attempted to move section over to the section-specific new breadcrumbs function. Tom Alexander 2020-05-25 23:28:49 -04:00
  • 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. Tom Alexander 2020-05-25 22:50:10 -04:00
  • 108cffb771 Fully replaced conditional's Container type with ParameterizedBlock. Tom Alexander 2020-05-25 21:26:16 -04:00
  • 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. Tom Alexander 2020-05-25 21:17:58 -04:00
  • 2527baeff4 Pull the calls for the DustTag constructor up out of parameterized_block. Tom Alexander 2020-05-25 20:40:58 -04:00
  • 0ca17e0885 Add tests that prove that the priority between explicit contexts and parameters varies across sections and partials. Tom Alexander 2020-05-25 20:23:10 -04:00
  • 92ad15ff85 Merge branch 'explicit_context_setting' into render Tom Alexander 2020-05-25 19:34:48 -04:00
  • c78695d08e Remove a TODO. Tom Alexander 2020-05-25 19:34:36 -04:00
  • 5b1e3c5fb0 Had to sort the input to the explicit_context_setting test because dustjs leaves the original order but serde_json sorts the keys. Tom Alexander 2020-05-25 19:30:30 -04:00
  • 25eb9b10a0 I did it backwards, I needed to use the explicit context from the block, not the inline partial. Tom Alexander 2020-05-25 19:22:20 -04:00
  • 6845df7f96 First attempt at an implementation of the new breadcrumbs for blocks/inline partials. Tom Alexander 2020-05-25 19:11:14 -04:00
  • 83623897af Integrate new_breadcrumbs into the helpers. Tom Alexander 2020-05-25 18:08:29 -04:00
  • 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). Tom Alexander 2020-05-25 17:53:04 -04:00
  • 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. Tom Alexander 2020-05-25 16:30:15 -04:00
  • 4ce0899279 Expand the explicit context setting test to prove that injected_context gets inserted AFTER the current context when an explicit context is used. Tom Alexander 2020-05-25 16:21:25 -04:00
  • 17121aa85b Integrated new_breadcrumbs into exists and not exists, and partially integrated it into partials. Tom Alexander 2020-05-25 16:03:00 -04:00
  • 32c047a9b9 Integrate the new_breadcrumbs function into sections. Tom Alexander 2020-05-25 15:55:52 -04:00
  • d79447e602 Update the new_breadcrumbs function to return an Option to prevent needlessly cloning the breadcrumbs when no new contexts are to be added. Tom Alexander 2020-05-25 15:49:30 -04:00
  • 4a21ae5af3 Add tests for explicit context setting that check failure conditions and implement a helper function to generate a new breadcrumb stack. Tom Alexander 2020-05-25 15:40:42 -04:00
  • 8121c93392 Make the dust template parser all_consuming. Tom Alexander 2020-05-25 14:17:38 -04:00
  • 5b2ac7c2c2 Add parser support for explicit contexts in helpers. Tom Alexander 2020-05-25 14:14:17 -04:00
  • 12de0245c5 Implemented parser support for explicit contexts in partials. Tom Alexander 2020-05-25 14:05:46 -04:00
  • 9031108d2a Implemented parsing for explicit contexts in NamedBlocks. Tom Alexander 2020-05-25 13:55:17 -04:00
  • dbee569931 Finish adding explicit context to the parser for Container. Tom Alexander 2020-05-25 13:38:31 -04:00
  • 1152ff9974 Greatly expand the explicit_context_setting test. Tom Alexander 2020-05-24 18:16:16 -04:00
  • e27ab16e06 Add a test for explicit context setting. Tom Alexander 2020-05-24 17:19:34 -04:00
  • d813a878ca Merge branch 'idx_and_len' into render Tom Alexander 2020-05-24 16:58:08 -04:00
  • c09393da80 Switch the renderer over to using the new is_truthy value and add the injection of $idx and $len into the context tree. Tom Alexander 2020-05-24 16:57:24 -04:00