513 Commits (master)
 

Author SHA1 Message Date
Tom Alexander 3428a3f509
Increment the version for publishing to crates.io. 3 years ago
Tom Alexander 0302ed216f
Add my implementation of a take_until_parser_matches parser.
The author of nom is too busy to review the PR, and cargo does not allow for git dependencies, so I am going to copy my implementation into this code base so I can use upstream nom so I can push to cargo. While this code has been submitted upstream to nom which is under the MIT license, I am the author of this code so I believe I have the full right to also release it in this project under the 0BSD license.
3 years ago
Tom Alexander b4dd4cebfd
Expose the integrations through the library so they can be used outside this project. 3 years ago
Tom Alexander 7cb79f6762
Add metadata for pushing to crates.io 3 years ago
Tom Alexander bd1f8cb383
Merge branch 'task/separate_out_json_implementation' 3 years ago
Tom Alexander 900d929869
Move the json integration to its own file to keep the serde stuff separate. 3 years ago
Tom Alexander a9a83d1b4a
Update for the latest nom and make serde an optional dep. 3 years ago
Tom Alexander aa3ed99fca
Create a json-integration feature flag and disable building the CLI program without it. 3 years ago
Tom Alexander 7602599cf2
Add todo.md to the gitignore. 3 years ago
Tom Alexander 5df2d19212
Updating README. 4 years ago
Tom Alexander a76a7bb2b8
Merge branch 'render' 4 years ago
Tom Alexander bd8b74984e
Merge branch 'helper_type_cast' into render 4 years ago
Tom Alexander a622a7e1bc
Add an is_castable() function to stop casting to number for booleans in the @size helper. 4 years ago
Tom Alexander e54e20d254
Add a test case for casting booleans to numbers. 4 years ago
Tom Alexander c300d18a75
Implement the outstanding type casts for serde_json. 4 years ago
Tom Alexander 021a7bd739
Implement the outstanding type casts for OwnedLiterals. 4 years ago
Tom Alexander eb3b1ae30a
Add stubs for casting the new OwnedBooleans. 4 years ago
Tom Alexander 83c86ff9b3
Move ComparisonNumber into the library and add an OwnedLiteral for booleans. 4 years ago
Tom Alexander 8ab315abfe
Adding stubs for type casting to string and boolean. 4 years ago
Tom Alexander d47e004084
Implement logic in comparison helpers to perform type casting. Casting to non-number not yet implemented. 4 years ago
Tom Alexander 5dff03bb37
Add a test case for type casting to the equality helper tests. 4 years ago
Tom Alexander 4731ddaa6b
Remove unused import. 4 years ago
Tom Alexander 22d91e9323
Merge branch 'helper_size' into render 4 years ago
Tom Alexander 92c65a109b
Implement the contextDump helper. 4 years ago
Tom Alexander 648ae5dfdb
Turns out I was wrong, the @size helper attempts to cast to a number regardless of the input and it uses that. Fixed the test. 4 years ago
Tom Alexander e70f397545
First attempt at fixing by reading all indirect references containing a reference to a single value as the original value is a failure. Turns out the @size helper treats numeric types in indirect references differently. 4 years ago
Tom Alexander 716a110d2e
Added some notes about observed behavior and fixed return types for missing/absent keys. 4 years ago
Tom Alexander 69fa266692
Allow spaces before closing braces on tags without parameters.
Previously I incorrectly only supported spaces before closing braces on tags with parameters. This patch expands that behavior to all tags.
4 years ago
Tom Alexander 44d54c86d2
Implement the size helper but it has a bug somewhere. 4 years ago
Tom Alexander a6c22417e5
Implement Sizable for both OwnedLiterals and serde_json. 4 years ago
Tom Alexander 1a54e35736
Add tests and a Sizable trait for ContextElement. 4 years ago
Tom Alexander 76193bf806
Stubs for the size and contextDump helpers. 4 years ago
Tom Alexander c3ebf4c66c
Merge branch 'helper_math' into render 4 years ago
Tom Alexander c5a0ad6786
Wire up the math functions to the renderer. 4 years ago
Tom Alexander cdd10576e8
Wire up serde_json for the math functions. 4 years ago
Tom Alexander 431b34dac7
Wired up the OwnedLiterals to the math functions. 4 years ago
Tom Alexander fdd467298a
Finish the MathNumber implementations. 4 years ago
Tom Alexander f783f45d24
Implement the 2-number math functions for MathNumber. 4 years ago
Tom Alexander 0a2e1b007c
Add stubs for MathNumber. 4 years ago
Tom Alexander d8b8c223f0
Add stubs for the math functions. 4 years ago
Tom Alexander 2c5c2d239c
Add a special case to not render anything if the method parameter to the math helper is a template to match the official DustJS implementation. 4 years ago
Tom Alexander b897656cef
Fix all of the math test except for block template-based methods. 4 years ago
Tom Alexander d9f10290f5
Math helper nearly done, test almost passes. 4 years ago
Tom Alexander 28a4fea96f
Remove RValue from ParametersContext so I can re-use it for calculated values from math. 4 years ago
Tom Alexander e6c17fb603
Bodiless math is now working in the simple cases. 4 years ago
Tom Alexander dcbf8e83f6
Implement number casting. 4 years ago
Tom Alexander 9eb70f436c
Starting a type casting trait 4 years ago
Tom Alexander 11096d7ece
Bodiless math implementation. 4 years ago
Tom Alexander 241f6c04e4
Rename JsonNumber to ComparisonNumber. 4 years ago
Tom Alexander d6ad7c28f3
Move MathNumber into the library.
While this will be used for the OwnedLiterals since they must always exhibit the original DustJS behavior, I am going to keep exposing separate math functions for ContextElement instead of simply requiring them to implement Into<MathNumber> since people might want to implement math in unusual ways with unusual types.
4 years ago