Tom Alexander
1a54e35736
Add tests and a Sizable trait for ContextElement.
2020-06-14 12:54:03 -04:00
Tom Alexander
0a2e1b007c
Add stubs for MathNumber.
2020-06-13 22:23:40 -04:00
Tom Alexander
d8b8c223f0
Add stubs for the math functions.
2020-06-13 22:12:00 -04:00
Tom Alexander
9eb70f436c
Starting a type casting trait
2020-06-13 19:39:31 -04:00
Tom Alexander
db11677b22
Implement addition for OwnedLiterals.
2020-06-13 17:50:22 -04:00
Tom Alexander
576d94780a
Implement a SelectContext for passing the select parameters and whether or not any comparison passed down exactly 1 level in the renderer.
2020-06-07 18:33:34 -04:00
Tom Alexander
d06fbea288
Remove unused code and clean up warnings.
2020-06-07 13:27:57 -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
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
303f092c30
Running into lifetime issues again.
2020-05-31 23:47:20 -04:00
Tom Alexander
da15439946
Start of IceResult to return owned values from into_context_element.
2020-05-31 23:29:12 -04:00
Tom Alexander
064027e77b
Worked around a lifetime issue with into_context_element.
2020-05-31 22:31:05 -04:00
Tom Alexander
b74dc394a8
Switched to returning an Option for into_context_element().
2020-05-31 22:17:58 -04:00
Tom Alexander
15c8e3bf28
Get rid of the CloneIntoBoxedContextElement trait for now because I don't know if its still going to be necessary with this overhaul.
2020-05-31 18:31:49 -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
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
Tom Alexander
975ab278ef
Starting an IntoContextElement trait to allow for delayed evaluation.
2020-05-30 16:34:32 -04:00
Tom Alexander
3c9a369908
Skipping over pseudo contexts has fixed most of the tests.
2020-05-30 11:50:55 -04:00
Tom Alexander
966499db76
Switch the get_loop_elements implementation to only return populated arrays when its an array-like object.
2020-05-24 16:27:13 -04:00
Tom Alexander
59ee4f508f
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.
2020-05-24 16:16:43 -04:00
Tom Alexander
8748cb7063
Structure for ordering, need to implement for serde_json::Value.
2020-05-16 13:31:52 -04:00
Tom Alexander
75ba35a422
Cleaning up.
2020-05-10 22:20:39 -04:00
Tom Alexander
2fb7ca9db7
Making CastToAny more generic.
2020-05-10 22:05:48 -04:00
Tom Alexander
9baa669dea
Separating out CastToAny.
2020-05-10 22:04:41 -04:00
Tom Alexander
32abe41e1a
Generic implementation of CompareContextElement.
2020-05-10 21:11:49 -04:00
Tom Alexander
256051220d
Generic implementation of CloneIntoBoxedContextElement.
2020-05-10 21:07:31 -04:00
Tom Alexander
7f89685537
PartialEq implemented too.
2020-05-10 21:00:06 -04:00
Tom Alexander
e986a1ba7a
PartialEq compiling with double lifetimes.
2020-05-10 20:58:47 -04:00
Tom Alexander
8fd2a9cf39
tentatively seems to be working.
2020-05-10 19:16:55 -04:00
Tom Alexander
c96b2257d7
Compiling.
...
Need to see if I can do a generic implemented of IntoBoxedContextElement for all objects implementing Copy, and I need to implement the compare code to make sure this all works before I start integrating this more.
2020-05-10 19:07:41 -04:00
Tom Alexander
5c79b436a0
Commenting out the parameterscontext type.
2020-05-10 19:01:02 -04:00
Tom Alexander
f386e5c31b
Adding trait to cast to Any.
2020-05-10 17:12:15 -04:00
Tom Alexander
c438653449
No luck.
2020-05-10 15:02:59 -04:00
Tom Alexander
7e0e776486
Running into lifetime issues.
2020-05-10 14:53:12 -04:00
Tom Alexander
d758a71fb4
Ported the get_loop_elements wrapper.
2020-05-09 14:14:22 -04:00
Tom Alexander
fcb2f3fc4d
Going extreme: removing all fields and unifying all walk errors.
2020-05-09 14:00:19 -04:00
Tom Alexander
18f9fb7f57
Delete old render functions.
2020-05-05 20:43:53 -04:00
Tom Alexander
caa79d5ba2
Moving towards a generic trait wrapper to call between dynamic and static dispatch functions.
2020-05-02 15:55:38 -04:00
Tom Alexander
f0a69d12b9
First attempt at a section render function.
...
Running into an issue with generics vs dynamic references.
2020-04-28 20:46:29 -04:00
Tom Alexander
e5c4ba8c82
Add a Loopable trait for dust sections.
2020-04-28 19:34:52 -04:00
Tom Alexander
c961cf7ab8
Combine the render traits into a single context_element file.
2020-04-28 19:09:02 -04:00