Dirkjan Ochtman
5f3e93da3f
Use error-chain to create a crate-specific Error type
2017-08-14 12:57:01 +02:00
Dirkjan Ochtman
9dcba34f0d
Define type askama::Result to use for all rendering methods
2017-08-14 12:22:48 +02:00
Anthony Nowell
0b814fd0fa
Generate with full path to Result
2017-08-13 10:43:34 +02:00
Dirkjan Ochtman
8bda0d64d5
Inline scope tracking abstraction again
2017-08-10 21:49:15 +02:00
Dirkjan Ochtman
1a9a82ac7d
Keep better track of nested scope through scope chains
2017-08-10 21:46:19 +02:00
Dirkjan Ochtman
44e4741504
Replace unwrap() with expect() call for parent type finding
2017-08-10 12:53:10 +02:00
Dirkjan Ochtman
68572d35ce
Add note to template_dir() about being duplicated
2017-08-10 12:52:48 +02:00
Dirkjan Ochtman
420fd89174
Prevent allocations for loop target names
2017-08-10 12:22:07 +02:00
Dirkjan Ochtman
cece25b0be
Implement Display for all Templates
2017-08-10 09:51:48 +02:00
Dirkjan Ochtman
1e0ee705a8
Propagate format errors and rename render_to()
to render_into()
2017-08-10 09:27:33 +02:00
Dirkjan Ochtman
ffc74a1775
Add helper methods to abstract away dealing with scopes
2017-08-08 20:46:38 +02:00
Dirkjan Ochtman
3e1dbe4d6d
Add some comments to clarify structure of the code generator
2017-08-08 20:45:57 +02:00
Dirkjan Ochtman
d40f5a3ea6
Reorganize code order in askama_derive modules
2017-08-08 20:29:43 +02:00
Dirkjan Ochtman
946e8c7587
Clean up use statements in code generator
2017-08-08 20:26:03 +02:00
Dirkjan Ochtman
e3d08c72bc
Implement Deref<Parent> for inheriting templates ( fixes #28 )
2017-08-08 12:36:29 +02:00
Dirkjan Ochtman
20efa67bc1
Refactor handling of paths and trait names
2017-08-08 12:36:26 +02:00
Dirkjan Ochtman
a993920ae6
Move path_as_identifier() closer to driver
2017-08-08 12:18:34 +02:00
Dirkjan Ochtman
21e5c86ea2
Add some comments to clarify code generator methods
2017-08-08 12:17:11 +02:00
Dirkjan Ochtman
b3b9849f7e
Simplify write_header() method by taking trait name directly
2017-08-08 12:14:22 +02:00
Dirkjan Ochtman
ed2fd2b105
Share HashSet for locals among nested Generators
2017-08-06 20:55:41 +02:00
Dirkjan Ochtman
47df34c0f0
Expand include node to template source during code generation
2017-08-06 14:59:27 +02:00
Dirkjan Ochtman
077c56c007
Use one way of finding templates on the path
2017-08-06 14:56:09 +02:00
Dirkjan Ochtman
b9cb5b82e6
Merge handling of trailing newline into get_template_source()
2017-08-06 14:51:56 +02:00
Dirkjan Ochtman
05f11a6843
Add test for path::get_template_source()
2017-08-06 14:48:55 +02:00
Dirkjan Ochtman
21885c06bf
Allow parent templates to be specified as relative paths ( fixes #26 )
2017-08-06 14:44:35 +02:00
Dirkjan Ochtman
0514e4fec7
Add tests for find_template_from_path()
2017-08-06 14:44:35 +02:00
Dirkjan Ochtman
670dbe4aec
Add function to find template relative to another template's path
2017-08-06 14:44:29 +02:00
Dirkjan Ochtman
e293a1a90c
Add test for panic on invalid blocks (see #27 )
2017-08-04 15:58:09 +02:00
Dirkjan Ochtman
a90b065f46
Let parse() panic if template is not parsed completely ( fixes #27 )
2017-08-04 15:57:49 +02:00
Dirkjan Ochtman
061330d850
Handle parsing for blocks in one place
2017-08-04 15:56:30 +02:00
Dirkjan Ochtman
51eee57b84
Add support for include blocks (see #25 )
2017-08-04 13:21:55 +02:00
Dirkjan Ochtman
02e0f783f9
Bump version to 0.3.4
2017-08-02 21:00:23 +02:00
Dirkjan Ochtman
8ff2e316c0
Merge changes
2017-08-02 20:59:30 +02:00
Dirkjan Ochtman
91fe53d9b5
Bump version number to 0.3.3
2017-08-02 20:54:07 +02:00
Dirkjan Ochtman
77c8279031
Bump version number to 0.3.2
2017-08-02 20:51:35 +02:00
Dirkjan Ochtman
82d85bbc20
Fix edge cases in content literal parser ( fixes #24 )
2017-08-02 20:48:41 +02:00
Dirkjan Ochtman
71d99927a6
Add support for chained attributes ( fixes #22 )
2017-05-26 11:45:27 +02:00
Dirkjan Ochtman
f0efc21b3e
Update dependencies
2017-05-12 20:31:31 +02:00
Dirkjan Ochtman
1d798e4a48
Bump version to 0.3.2
2017-03-12 20:55:15 +01:00
Dirkjan Ochtman
fe00fabd5c
Reference askama and std from the global scope ( fixes #17 )
...
With this change, importing `std` and `askama` into modules where templates
are defined is no longer necessary. `askama::Template` must still be imported
in scopes where methods of the `Template` trait are called.
2017-03-11 22:24:00 +01:00
Dirkjan Ochtman
e1b70fb1b9
Bump version to 0.3.1
2017-03-08 21:17:56 +01:00
Dirkjan Ochtman
ed89e5f027
Remove type parameter defaults from impls ( fixes #12 )
2017-03-08 20:14:55 +01:00
Dirkjan Ochtman
1d513f2781
Version bump to 0.3.0
2017-03-08 20:06:46 +01:00
Dirkjan Ochtman
6e1ef94b93
Use if let to better handle Option type
2017-03-08 19:56:53 +01:00
Dirkjan Ochtman
c927d51fe1
Copy type parameters and where clauses ( fixes #11 )
2017-03-08 19:55:27 +01:00
Dirkjan Ochtman
f229c79517
Inline annotations() helper into write_header()
2017-03-07 21:39:41 +01:00
Dirkjan Ochtman
2d5c2d2f10
Extract writing of impl headers in generator
2017-03-07 21:34:09 +01:00
Dirkjan Ochtman
8d97f81880
Panic with better message if template not found ( fixes #4 )
2017-03-07 21:14:57 +01:00
Dirkjan Ochtman
d65d08b937
Panic with better message if template attribute is not found ( fixes #3 )
2017-03-07 21:07:01 +01:00
Dirkjan Ochtman
18735c9644
Use enumerate() for much simpler loop indexes ( fixes #10 )
2017-03-06 22:47:25 +01:00