2315 Commits

Author SHA1 Message Date
Dirkjan Ochtman
61f570b240 Bump askama version to 0.1.1 2017-02-15 20:43:36 +01:00
Dirkjan Ochtman
58faa39f99 Depend on askama-0.1 for Cargo purposes 2017-02-15 20:42:01 +01:00
Dirkjan Ochtman
ab639de2ee Fix Travis badge repository 2017-02-15 20:39:26 +01:00
Dirkjan Ochtman
c6552eda1d Add comment about running the example 2017-02-15 20:34:33 +01:00
Dirkjan Ochtman
63f18932db Add remark about challenging debugging 2017-02-15 20:34:17 +01:00
Dirkjan Ochtman
07cd92c4a7 Fix link to testing crate 2017-02-15 20:32:56 +01:00
Dirkjan Ochtman
81bdae39c1 Initial version of README 2017-02-15 20:31:31 +01:00
Dirkjan Ochtman
dc9c44e952 Add more metadata to Cargo manifests 2017-02-15 20:14:04 +01:00
Dirkjan Ochtman
a2af8348cc Be smarter about writing indentation correctly
By applying simple if slightly magic heuristics, relieve the need for
calls to indent() and dedent() in most places in the code generator.
2017-02-14 21:17:24 +01:00
Dirkjan Ochtman
bab940d174 Fix indentation for else clauses 2017-02-14 21:08:34 +01:00
Dirkjan Ochtman
ed0f9293e8 Tweak trait handling to get rid of struct impls 2017-02-14 21:08:17 +01:00
Dirkjan Ochtman
21852a33bc Move code for whitespace handling around 2017-02-14 20:38:12 +01:00
Dirkjan Ochtman
fe616492dc Remove some useless cruft 2017-02-14 20:37:28 +01:00
Dirkjan Ochtman
ca5bfc1116 Implement support for mul, div, mod operators 2017-02-13 22:00:35 +01:00
Dirkjan Ochtman
a6b4f305e9 Rename comparison tests to be about any operators 2017-02-13 21:57:29 +01:00
Dirkjan Ochtman
3000d98a04 Establish expression parser hierarchy 2017-02-13 21:51:20 +01:00
Dirkjan Ochtman
6b68856b28 Generically represent binary operators in parse tree 2017-02-13 21:40:16 +01:00
Dirkjan Ochtman
66a1a06df1 Rename filter e to escape, keep e as alias 2017-02-13 21:36:52 +01:00
Dirkjan Ochtman
ef8b20e341 Use internal implementation of HTML escaping 2017-02-13 21:34:40 +01:00
Dirkjan Ochtman
3b70780340 Test support for variables in inherited templates 2017-02-12 20:42:43 +01:00
Dirkjan Ochtman
c74e9e8971 Explicitly pass trait implementation to top-level base template method
This requires a base template struct to be a member of the derived template's
context, but allows the base template to access base template fields.
2017-02-12 20:38:14 +01:00
Dirkjan Ochtman
7b831bd79f Remove lifetime annotations from trait definition 2017-02-12 20:34:37 +01:00
Dirkjan Ochtman
2befc17e3d Improve Generator impl/trait writing method names 2017-02-12 13:52:16 +01:00
Dirkjan Ochtman
d0481b8c62 Improve formatting of generated code 2017-02-12 12:12:23 +01:00
Dirkjan Ochtman
4691cf3559 Add test for using base template directly 2017-02-12 12:06:18 +01:00
Dirkjan Ochtman
24946f0683 Refactor implementation of template inheritance
This is somewhat less complicated, and should support variables better.
2017-02-12 12:01:03 +01:00
Dirkjan Ochtman
ba802709f8 Rename functions to move away from 'into' suffix
This is idiomatically used for type conversions.
2017-02-12 10:40:09 +01:00
Dirkjan Ochtman
7b03379b79 Use is_none() for simple Option tests 2017-02-08 20:34:04 +01:00
Dirkjan Ochtman
a47020d4d5 Simplify derive_template() function 2017-02-08 20:30:32 +01:00
Dirkjan Ochtman
330e2ef471 Simplify code to find template path 2017-02-08 19:46:12 +01:00
Dirkjan Ochtman
4e34adcbbe Extract template_dir() helper method 2017-02-08 19:34:22 +01:00
Dirkjan Ochtman
0bc54d366a Expose less granular API in askama crate 2017-02-08 19:12:21 +01:00
Dirkjan Ochtman
66dd21c857 Move build script helper code into askama crate 2017-02-08 18:34:25 +01:00
Dirkjan Ochtman
1dc554fafc Add build script to force rebuild on template changes 2017-02-08 16:39:53 +01:00
Dirkjan Ochtman
a3844f8ce5 Fix some bugs in whitespace handling 2017-02-08 16:19:08 +01:00
Dirkjan Ochtman
06bd6ef634 Implement generator support for whitespace handling markers 2017-02-08 14:49:27 +01:00
Dirkjan Ochtman
38c31ee4bd Move handling of Node::Lit parts into write_lit() method 2017-02-08 14:16:15 +01:00
Dirkjan Ochtman
0a26ac7644 Simplify write_lit() method 2017-02-08 14:13:39 +01:00
Dirkjan Ochtman
6a335092f8 Convert everything to &str in the parser code 2017-02-08 14:07:46 +01:00
Dirkjan Ochtman
e54b8c898e Add support for whitespace handling markers to parser 2017-02-08 13:30:57 +01:00
Dirkjan Ochtman
b1dc4d5057 Improve readability of parser macro invocations 2017-02-08 11:42:35 +01:00
Dirkjan Ochtman
ba399c91b5 Simplify code generation for block definitions 2017-02-08 11:35:21 +01:00
Dirkjan Ochtman
4d32496953 Test all crates in the workspace 2017-02-08 11:00:20 +01:00
Dirkjan Ochtman
bba3950c37 Add unit tests for whitespace splitter 2017-02-08 10:59:57 +01:00
Dirkjan Ochtman
4805acc8eb Split leading and trailing whitespace out of literals 2017-02-08 10:59:48 +01:00
Dirkjan Ochtman
e6d70fc171 Add basic Travis configuration 2017-02-08 10:08:49 +01:00
Dirkjan Ochtman
e1745be802 Assorted cleanups as suggested by clippy 2017-02-08 09:42:56 +01:00
Dirkjan Ochtman
d58ade7c8d Simplify types for Nodes and Conds, pass slice where possible 2017-02-08 09:40:09 +01:00
Dirkjan Ochtman
6880f1895e Stop taking references where unneeded 2017-02-08 09:31:52 +01:00
Dirkjan Ochtman
3a12f77521 Purge useless format!() calls 2017-02-08 09:24:24 +01:00