Commit Graph

  • 3428a3f509 Increment the version for publishing to crates.io. master Tom Alexander 2021-02-06 16:28:56 -05:00
  • 0302ed216f Add my implementation of a take_until_parser_matches parser. Tom Alexander 2021-02-06 16:23:54 -05:00
  • b4dd4cebfd Expose the integrations through the library so they can be used outside this project. Tom Alexander 2020-12-30 15:17:48 -05:00
  • 7cb79f6762 Add metadata for pushing to crates.io Tom Alexander 2020-12-29 18:31:44 -05:00
  • bd1f8cb383 Merge branch 'task/separate_out_json_implementation' Tom Alexander 2020-12-29 18:22:56 -05:00
  • 900d929869 Move the json integration to its own file to keep the serde stuff separate. Tom Alexander 2020-12-29 18:21:12 -05:00
  • a9a83d1b4a Update for the latest nom and make serde an optional dep. Tom Alexander 2020-12-29 18:07:49 -05:00
  • aa3ed99fca Create a json-integration feature flag and disable building the CLI program without it. Tom Alexander 2020-12-29 17:51:46 -05:00
  • 7602599cf2 Add todo.md to the gitignore. Tom Alexander 2020-12-29 17:40:41 -05:00
  • 5df2d19212 Updating README. Tom Alexander 2020-06-27 16:57:21 -04:00
  • a76a7bb2b8 Merge branch 'render' Tom Alexander 2020-06-14 18:44:29 -04:00
  • bd8b74984e Merge branch 'helper_type_cast' into render Tom Alexander 2020-06-14 18:28:02 -04:00
  • a622a7e1bc Add an is_castable() function to stop casting to number for booleans in the @size helper. Tom Alexander 2020-06-14 18:27:28 -04:00
  • e54e20d254 Add a test case for casting booleans to numbers. Tom Alexander 2020-06-14 18:14:27 -04:00
  • c300d18a75 Implement the outstanding type casts for serde_json. Tom Alexander 2020-06-14 17:59:57 -04:00
  • 021a7bd739 Implement the outstanding type casts for OwnedLiterals. Tom Alexander 2020-06-14 17:37:51 -04:00
  • eb3b1ae30a Add stubs for casting the new OwnedBooleans. Tom Alexander 2020-06-14 17:23:54 -04:00
  • 83c86ff9b3 Move ComparisonNumber into the library and add an OwnedLiteral for booleans. Tom Alexander 2020-06-14 17:08:01 -04:00
  • 8ab315abfe Adding stubs for type casting to string and boolean. Tom Alexander 2020-06-14 16:38:55 -04:00
  • d47e004084 Implement logic in comparison helpers to perform type casting. Casting to non-number not yet implemented. Tom Alexander 2020-06-14 16:30:21 -04:00
  • 5dff03bb37 Add a test case for type casting to the equality helper tests. Tom Alexander 2020-06-14 16:20:07 -04:00
  • 4731ddaa6b Remove unused import. Tom Alexander 2020-06-14 16:02:04 -04:00
  • 22d91e9323 Merge branch 'helper_size' into render Tom Alexander 2020-06-14 15:50:35 -04:00
  • 92c65a109b Implement the contextDump helper. Tom Alexander 2020-06-14 15:50:22 -04:00
  • 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. Tom Alexander 2020-06-14 15:20:54 -04:00
  • 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. Tom Alexander 2020-06-14 14:51:31 -04:00
  • 716a110d2e Added some notes about observed behavior and fixed return types for missing/absent keys. Tom Alexander 2020-06-14 14:13:33 -04:00
  • 69fa266692 Allow spaces before closing braces on tags without parameters. Tom Alexander 2020-06-14 13:29:01 -04:00
  • 44d54c86d2 Implement the size helper but it has a bug somewhere. Tom Alexander 2020-06-14 13:16:52 -04:00
  • a6c22417e5 Implement Sizable for both OwnedLiterals and serde_json. Tom Alexander 2020-06-14 13:06:03 -04:00
  • 1a54e35736 Add tests and a Sizable trait for ContextElement. Tom Alexander 2020-06-14 12:54:03 -04:00
  • 76193bf806 Stubs for the size and contextDump helpers. Tom Alexander 2020-06-14 12:32:10 -04:00
  • c3ebf4c66c Merge branch 'helper_math' into render Tom Alexander 2020-06-13 23:04:36 -04:00
  • c5a0ad6786 Wire up the math functions to the renderer. Tom Alexander 2020-06-13 23:01:29 -04:00
  • cdd10576e8 Wire up serde_json for the math functions. Tom Alexander 2020-06-13 22:55:38 -04:00
  • 431b34dac7 Wired up the OwnedLiterals to the math functions. Tom Alexander 2020-06-13 22:52:07 -04:00
  • fdd467298a Finish the MathNumber implementations. Tom Alexander 2020-06-13 22:46:03 -04:00
  • f783f45d24 Implement the 2-number math functions for MathNumber. Tom Alexander 2020-06-13 22:32:30 -04:00
  • 0a2e1b007c Add stubs for MathNumber. Tom Alexander 2020-06-13 22:23:40 -04:00
  • d8b8c223f0 Add stubs for the math functions. Tom Alexander 2020-06-13 22:12:00 -04:00
  • 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. Tom Alexander 2020-06-13 22:03:48 -04:00
  • b897656cef Fix all of the math test except for block template-based methods. Tom Alexander 2020-06-13 21:37:11 -04:00
  • d9f10290f5 Math helper nearly done, test almost passes. Tom Alexander 2020-06-13 21:28:21 -04:00
  • 28a4fea96f Remove RValue from ParametersContext so I can re-use it for calculated values from math. Tom Alexander 2020-06-13 21:13:16 -04:00
  • e6c17fb603 Bodiless math is now working in the simple cases. Tom Alexander 2020-06-13 20:02:48 -04:00
  • dcbf8e83f6 Implement number casting. Tom Alexander 2020-06-13 19:55:40 -04:00
  • 9eb70f436c Starting a type casting trait Tom Alexander 2020-06-13 19:39:31 -04:00
  • 11096d7ece Bodiless math implementation. Tom Alexander 2020-06-13 19:28:45 -04:00
  • 241f6c04e4 Rename JsonNumber to ComparisonNumber. Tom Alexander 2020-06-13 19:15:51 -04:00
  • d6ad7c28f3 Move MathNumber into the library. Tom Alexander 2020-06-13 19:13:02 -04:00
  • d9ce011113 Add implementation based on MathNumber. Tom Alexander 2020-06-13 19:02:56 -04:00
  • df0ae05648 Start of implementation for serde_json but I'm going to change my approach. Tom Alexander 2020-06-13 18:34:13 -04:00
  • db11677b22 Implement addition for OwnedLiterals. Tom Alexander 2020-06-13 17:50:22 -04:00
  • 8ef3949a65 Fix float json to literal equality comparison by casting them both to float. Tom Alexander 2020-06-13 16:32:57 -04:00
  • de5932b4c6 Fix bug in parsing order for literals. Tom Alexander 2020-06-13 16:23:46 -04:00
  • 2a89fd826e Update tests to use templates instead of literal strings for string parameters. Tom Alexander 2020-06-13 16:18:48 -04:00
  • d99aa44d8e Add support for negative integers. Tom Alexander 2020-06-13 16:06:31 -04:00
  • 02bcefb75c Remove outdated TODO. Tom Alexander 2020-06-13 15:33:21 -04:00
  • 03ff75b2de Fix number comparison logic. Tom Alexander 2020-06-13 15:31:52 -04:00
  • 4d28120732 I have broken the comparison function. Tom Alexander 2020-06-13 14:55:27 -04:00
  • 5b656a44ad For partial_cmp, convert OwnedLiterals into serde_json values. Tom Alexander 2020-06-13 14:19:03 -04:00
  • a378d6e6f3 Add comparisons for json floats but not yet between OwnedLiterals and json. Tom Alexander 2020-06-13 13:47:43 -04:00
  • 978bbe6eb3 Implemented float literals for OwnedLiterals, not yet for serde_json. Tom Alexander 2020-06-13 13:37:26 -04:00
  • 8daa746da6 Initial structure for the perform_math_operation function. Tom Alexander 2020-06-13 13:16:25 -04:00
  • 6877e3d393 Add parser support for the math helper. Tom Alexander 2020-06-13 12:03:55 -04:00
  • c5db1cea8f Add a test case for the math helper and add else blocks to the select test. Tom Alexander 2020-06-13 11:45:45 -04:00
  • c06cc61a07 Merge branch 'helper_select' into render Tom Alexander 2020-06-07 19:11:37 -04:00
  • a937a12db6 Cleanup. Tom Alexander 2020-06-07 19:11:21 -04:00
  • 88887bff0f Implemented early termination. Tom Alexander 2020-06-07 19:10:25 -04:00
  • 0fac063c8d Implemented none and any, but I need to implement early termination. Tom Alexander 2020-06-07 18:52:09 -04:00
  • f1b868ce33 I think I have the code for the select tag finished, but I haven't yet implemented any or none. Tom Alexander 2020-06-07 18:44:27 -04:00
  • 576d94780a Implement a SelectContext for passing the select parameters and whether or not any comparison passed down exactly 1 level in the renderer. Tom Alexander 2020-06-07 18:33:34 -04:00
  • b0b857147d Implemented code to find out if any comparison checks inside a select are true. Tom Alexander 2020-06-07 18:27:11 -04:00
  • ed38ce6a38 Unified the renderers for all the comparison helpers by moving their implementation to perform_comparison_check. Tom Alexander 2020-06-07 18:17:28 -04:00
  • 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. Tom Alexander 2020-06-07 18:11:14 -04:00
  • f2740987ec Add a parent to ParametersContext so we can chain parameters contexts for use with the select helper. Tom Alexander 2020-06-07 17:56:51 -04:00
  • a61807d84c Add parser support for select/any/none. Tom Alexander 2020-06-07 17:06:14 -04:00
  • 84c07b262c Add a test for the select helper. Tom Alexander 2020-06-07 16:03:18 -04:00
  • a749f91e8e Ported over the comparison helpers to using the new tap function. Tom Alexander 2020-06-07 16:49:15 -04:00
  • b35874f19e Merge branch 'helper_sep' into render Tom Alexander 2020-06-07 15:19:29 -04:00
  • 78dad3273a Remove $len from first helper since its not needed. Tom Alexander 2020-06-07 15:18:03 -04:00
  • 417466d17d Implement the first and last helpers. Tom Alexander 2020-06-07 15:16:39 -04:00
  • fdecdcb53b Implemented the sep helper. Tom Alexander 2020-06-07 15:09:37 -04:00
  • 3fb91566bb Implement get and tap functions. Tom Alexander 2020-06-07 14:45:32 -04:00
  • 3ef2facc92 Expanding the sep helpers test. Tom Alexander 2020-06-07 14:07:32 -04:00
  • bb658284e6 Add a test for the sep helper. Tom Alexander 2020-06-07 14:01:58 -04:00
  • d06fbea288 Remove unused code and clean up warnings. Tom Alexander 2020-06-07 13:25:27 -04:00
  • 4ab311c178 Merge branch 'into_context_element' into render Tom Alexander 2020-06-07 01:48:44 -04:00
  • 9b69ba7b09 Merge branch 'into_context_element_breadcrumb_tree' into into_context_element Tom Alexander 2020-06-07 01:48:29 -04:00
  • e00f043c19 Merge branch 'there_and_back_again' into into_context_element_breadcrumb_tree Tom Alexander 2020-06-07 01:48:05 -04:00
  • 4e1259f1c7 All tests working. Tom Alexander 2020-06-07 01:35:58 -04:00
  • 865cba6f4e Add a test proving that renamed variables are still equal, so its not just based on path. Tom Alexander 2020-06-07 01:15:45 -04:00
  • 4dee230780 Add some test cases for comparing equality on reference parameters. Tom Alexander 2020-06-07 01:11:40 -04:00
  • b1a85165b0 All tests passing! Tom Alexander 2020-06-07 01:04:00 -04:00
  • 4789a7d931 Fix the same issue in the renderer. Tom Alexander 2020-06-07 00:37:47 -04:00
  • 09d015346c Fixed a bug where I was failing to filter out pseudo elements during walking. Tom Alexander 2020-06-07 00:29:51 -04:00
  • 669a698575 Re-enable the ContextElement implementation for serde_json Tom Alexander 2020-06-07 00:17:55 -04:00
  • 422479bcf2 port over the remaining helpers. Tom Alexander 2020-06-07 00:12:01 -04:00
  • 8cbb31251c port over the equals/not equals helpers. Tom Alexander 2020-06-07 00:03:51 -04:00
  • c8de395038 Inline partials and blocks worked as-is. Tom Alexander 2020-06-06 23:18:28 -04:00