187 Commits

Author SHA1 Message Date
Tom Alexander
8daa746da6
Initial structure for the perform_math_operation function. 2020-06-13 13:16:25 -04:00
Tom Alexander
6877e3d393
Add parser support for the math helper. 2020-06-13 12:03:55 -04:00
Tom Alexander
a937a12db6
Cleanup. 2020-06-07 19:11:21 -04:00
Tom Alexander
88887bff0f
Implemented early termination. 2020-06-07 19:10:25 -04:00
Tom Alexander
0fac063c8d
Implemented none and any, but I need to implement early termination. 2020-06-07 18:52:09 -04:00
Tom Alexander
f1b868ce33
I think I have the code for the select tag finished, but I haven't yet implemented any or none. 2020-06-07 18:44:27 -04:00
Tom Alexander
b0b857147d
Implemented code to find out if any comparison checks inside a select are true. 2020-06-07 18:27:11 -04:00
Tom Alexander
ed38ce6a38
Unified the renderers for all the comparison helpers by moving their implementation to perform_comparison_check. 2020-06-07 18:17:28 -04:00
Tom Alexander
85d36fc516
Implemented perform_comparison_check to separate the comparison logic from the render code so that it can be used pre-rendering by the select helper. 2020-06-07 18:11:14 -04:00
Tom Alexander
f2740987ec
Add a parent to ParametersContext so we can chain parameters contexts for use with the select helper. 2020-06-07 17:56:51 -04:00
Tom Alexander
a61807d84c
Add parser support for select/any/none. 2020-06-07 17:06:14 -04:00
Tom Alexander
a749f91e8e
Ported over the comparison helpers to using the new tap function. 2020-06-07 16:49:15 -04:00
Tom Alexander
78dad3273a
Remove $len from first helper since its not needed. 2020-06-07 15:18:03 -04:00
Tom Alexander
417466d17d
Implement the first and last helpers. 2020-06-07 15:16:39 -04:00
Tom Alexander
fdecdcb53b
Implemented the sep helper. 2020-06-07 15:09:37 -04:00
Tom Alexander
3fb91566bb
Implement get and tap functions. 2020-06-07 14:45:32 -04:00
Tom Alexander
d06fbea288
Remove unused code and clean up warnings. 2020-06-07 13:27:57 -04:00
Tom Alexander
4e1259f1c7
All tests working. 2020-06-07 01:35:58 -04:00
Tom Alexander
b1a85165b0
All tests passing! 2020-06-07 01:04:00 -04:00
Tom Alexander
4789a7d931
Fix the same issue in the renderer. 2020-06-07 00:37:47 -04:00
Tom Alexander
422479bcf2
port over the remaining helpers. 2020-06-07 00:12:01 -04:00
Tom Alexander
8cbb31251c
port over the equals/not equals helpers. 2020-06-07 00:03:51 -04:00
Tom Alexander
c8de395038
Inline partials and blocks worked as-is. 2020-06-06 23:18:28 -04:00
Tom Alexander
250d428464
Updated Partial for the new architecture. 2020-06-06 23:17:50 -04:00
Tom Alexander
b396765488
Updated Exists/NotExists for the new architecture. 2020-06-06 23:15:12 -04:00
Tom Alexander
e28ebaf26a
Update IterationContext to be an IntoContextElement and finish implementing section. 2020-06-06 23:08:21 -04:00
Tom Alexander
00699b84ba
Finished converting back to Vec. 2020-06-06 22:45:58 -04:00
Tom Alexander
b0efe50410
Fixed new_breadcrumbs_section for the Vec based breadcrumbs. 2020-06-06 22:37:29 -04:00
Tom Alexander
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. 2020-06-06 22:24:27 -04:00
Tom Alexander
78bffb5f04
I think I need to switch back to a vec.
But with all I've built with IntoContextElement and BreadcrumbTreeElement I think the Vec will end up working in the end.
2020-06-06 21:46:02 -04:00
Tom Alexander
77b842f8de
Implement IntoContextElement for ParametersContext. 2020-06-06 20:48:29 -04:00
Tom Alexander
02259b9bd6
Create from_borrowed and from_owned constructors for IceResult and BreadcrumbTreeElement.
In an effort to keep track of how often memory is getting heap allocated, I am implementing constructors for IceResult and BreadcrumbTreeElement. This should limit the places that I call Rc::new and allow me to place tracing code into it later to ensure all code paths doing heap allocation make sense.
2020-06-06 20:24:01 -04:00
Tom Alexander
f9dea70d23
Implement conversion from IceResult into BreadcrumbTreeNode.
I believe this change will remove an extra heap allocation I was doing in the new_breadcrumbs_* functions for the explicit context by adding support for converting from Rc<dyn ContextElement> to Rc<dyn IntoContextElement> without copying the underlying data. This should allow conversion of the IceResult::Owned variant to the BreadcrumbTreeElement::Owned variant without extra copying.
2020-06-06 19:39:44 -04:00
Tom Alexander
c5b927ca11
Fix bug in use of breadcrumbs in new_breadcrumbs_partial. 2020-06-06 17:56:54 -04:00
Tom Alexander
e725728a65
I think I have solved the lifetime issue.
OwnedBreadcrumbTreeElement's needed a lifetime associated with them because IntoContextElement had lifetimes associated with it.
2020-06-06 17:52:46 -04:00
Tom Alexander
adbc236836
Broke the problem area down into parts to make it easier to debug. 2020-06-06 16:03:02 -04:00
Tom Alexander
842f39e178
Minor syntax fix. 2020-06-06 15:20:43 -04:00
Tom Alexander
303f092c30
Running into lifetime issues again. 2020-05-31 23:47:20 -04:00
Tom Alexander
b74dc394a8
Switched to returning an Option for into_context_element(). 2020-05-31 22:17:58 -04:00
Tom Alexander
7bf8012d6e
Need to mix back in parameterscontext. 2020-05-31 21:30:36 -04:00
Tom Alexander
bbc1a24631
Added back in reference. 2020-05-31 21:26:31 -04:00
Tom Alexander
da6655d4b6
General structure to the rendering code. 2020-05-31 21:18:54 -04:00
Tom Alexander
680fc167ea
Turns out it was just a lifetime issue. 2020-05-31 20:43:07 -04:00
Tom Alexander
2b8894f9c2
Most of new_breadcrumbs_partial, just need to get the return working. 2020-05-31 20:41:27 -04:00
Tom Alexander
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. 2020-05-31 19:01:51 -04:00
Tom Alexander
b8b4759d45
Remove iteration_context, parameters_context, and most of bin.rs.
Since I'm changing a pretty core concept of the renderer, I'm going to be rebuilding it piece by piece. In the interest of being able to rapidly change things and check if they are valid through compilation, I need to eliminate most of the old code so I do not have that weighing me down.
2020-05-31 18:27:55 -04:00
Tom Alexander
acb8dfb58e
Replaced the old renderer file with a new renderer file. 2020-05-31 18:18:21 -04:00
Tom Alexander
21b9e9282b
Ran into issue: Can't returned owned data when its expecting a trait object. 2020-05-30 18:28:33 -04:00
Tom Alexander
737c98d8b7
Add the renderer to calls to convert to a context element. 2020-05-30 18:16:58 -04:00
Tom Alexander
917da5a073
Put IntoContextElement everywhere. It compiles again. 2020-05-30 17:50:27 -04:00