Kogia-sima
c9e6449292
Add analyzer.rs
...
cc #53
2021-02-04 03:11:17 +09:00
Kogia-sima
10ab29be85
Prefer using scope guard for `fallback::unforce()`
...
This scope guard ensure that `fallback::unforce()` will be called even
if the program panics during compilation.
2021-02-03 15:52:14 +09:00
Kogia-sima
5e12280df1
Fix stable/nightly mismatch error cause by proc-macro2
...
fix #50
2021-02-03 02:56:15 +09:00
Kogia-sima
5209876df4
Bump version (0.3.0 => 0.3.1)
2021-01-23 19:27:25 +09:00
Kogia-sima
7bab7ac0a5
fix: Workaround for incorrect cargo fingerprints
...
Note: This is a silly hack to prevent temporary artifacts to be tracked
by cargo. This behaviour depends on cargo's internal implementation, and
thus this workaround may suddenly stop working in the future. Another
better option should be considered.
2021-01-23 19:09:54 +09:00
Kogia-sima
e69d36b168
refactor: clippy fix
2020-12-29 16:53:46 +09:00
Kogia-sima
d07afad79b
test: temporarily disable translator test
...
Currently the translator test cause unexpected error with "-Zprofile"
flag for unknown reason.
2020-12-29 03:24:59 +09:00
Kogia-sima
92c8f8a852
refactor: remove unused code
2020-12-24 17:41:51 +09:00
Kogia-sima
348a3825f2
perf: join after loop-optimization
2020-12-24 17:22:11 +09:00
Kogia-sima
1df0657350
Bump version (0.2.3 => 0.3.0)
2020-12-20 22:16:25 +09:00
Kogia-sima
28b5c6abd1
Generate more readable code
2020-12-19 20:51:01 +09:00
Kogia-sima
70033d604d
break: forbit implementing TemplateOnce trait by hand
2020-12-19 17:38:57 +09:00
Kogia-sima
15f397348a
refactor: Organize source code for readability
2020-12-18 23:00:40 +09:00
Kogia-sima
f98ed7426f
clippy fix
2020-12-18 19:23:20 +09:00
Kogia-sima
47c09e4f55
refactor: Remove dbg!()
2020-12-18 11:03:44 +09:00
Kogia-sima
e221a9b8b9
fix: Fix rendering issue on continue/break statements
...
fix #21
2020-12-17 13:28:40 +09:00
Kogia-sima
1ec10031f5
refactor: Turn off unused features in dependencies
2020-12-16 20:14:38 +09:00
Kogia-sima
a1abc2aaa3
refactor: Simplify derive option parsing
2020-12-16 19:55:28 +09:00
Kogia-sima
98edecdb3a
refactor: suppress use of to_string_lossy
2020-12-16 19:13:37 +09:00
Kogia-sima
6c7a74823f
refactor: use DefaultHasher instead of custom fnv hash implementation
2020-12-16 19:01:28 +09:00
Kogia-sima
790f7366cf
break: Update TemplateOnce trait structure
...
* Remove render_once_to_string method
* Add render_once_to method
* Now TemplateOnce trait requires both method implementation
* Some performance improvement
2020-12-16 19:01:28 +09:00
Kogia-sima
a965f03321
Update error format
2020-12-16 15:38:28 +09:00
Kogia-sima
541ecb91ef
Bump version (0.2.2 => 0.2.3)
2020-11-29 21:40:58 +09:00
Kogia-sima
db7aaf5edc
Add forbid(unsafe_code) in sailfish-compiler/macros
2020-11-29 21:22:31 +09:00
Kogia-sima
4e949848d0
Merge pull request #34 from Svenskunganka/master
...
Use std::result::Result in derive macro to allow custom Result types
2020-11-22 11:33:53 +09:00
Kogia-sima
834289be59
refactor: Reduce unsafe blocks
2020-11-21 18:44:52 +09:00
Tom Jordell
9d405ad9ff
Use std::result::Result in derive macro to allow custom Result types
2020-11-21 08:40:46 +01:00
Kogia-sima
cfd40f573b
Bump version (0.2.1 => v0.2.2)
2020-11-11 10:48:30 +09:00
Kogia-sima
af6c052b1f
Update proc-macro2 ( fix #32 )
2020-11-11 10:46:40 +09:00
Kogia-sima
2ba4a99582
Bump version (0.2.0 => 0.2.1)
2020-08-04 09:18:24 +09:00
Kogia-sima
5666f92b9d
Search rustfmt along all toolchains
2020-08-04 03:33:49 +09:00
Kogia-sima
4f64a3b7fe
Avoid over-size allocation in `render_once_to_string`
2020-07-25 23:56:17 +09:00
Kogia-sima
4fc278ecfb
Revert "Improve Template::render() performance"
...
This reverts commit 4e8b437387
.
2020-07-25 07:48:00 +09:00
Kogia-sima
4e8b437387
Improve Template::render() performance
2020-07-23 11:48:19 +09:00
Kogia-sima
cc10171b73
Avoid dangerous conversion from String to Buffer
2020-07-22 07:05:15 +09:00
Kogia-sima
9765de213f
Allow proc-macro2 v1.0.19 as a dependency
2020-07-21 07:22:34 +09:00
Kogia-sima
d0ef795161
Bump version (0.1.3 => 0.2.0)
2020-07-17 04:48:29 +09:00
Kogia-sima
1141580878
Fix number of skips on parsing code block
2020-07-15 23:22:10 +09:00
Kogia-sima
80b64fe883
break: Remove Buffer::set_len method
...
This method allows reducing the buffer size, but it should not be
possible.
Alternatively I added a Buffer::advance method to increase the length.
2020-07-15 19:49:35 +09:00
Kogia-sima
373ffc135e
Implement filter transformation
2020-07-15 07:38:11 +09:00
Kogia-sima
2d15165406
break: Syntactically disallow invalid filter expression
2020-07-15 04:17:50 +09:00
Kogia-sima
119e282945
Avoid generating _size_hint local variable
2020-07-15 00:06:01 +09:00
Kogia-sima
670d936def
break: remove runtime::Context API
2020-07-15 00:06:01 +09:00
Kogia-sima
869c58dcb1
Use UFCS instead of receiver coecions
...
This change is required to achieve filter
2020-07-15 00:06:01 +09:00
Kogia-sima
3040084ca9
do not use `sfrt` as an alias to sailfish::runtime
2020-07-15 00:05:56 +09:00
Kogia-sima
6c72bb17d1
Put all tests in sailfish-tests/ directory
2020-07-14 22:46:58 +09:00
Kogia-sima
b420cc0161
feat: Implement Compiler::compile_str() function
2020-07-14 22:07:35 +09:00
Kogia-sima
65636d2ebc
Suppress "Failed to remote artifact" error in rust-analyzer
2020-07-13 01:28:42 +09:00
Kogia-sima
3b06795f5e
Bump version (0.1.2 => 0.1.3)
2020-07-11 17:46:55 +09:00
Kogia-sima
9982ab0683
Suppress warning when `config` feature flag is disabled
2020-07-11 17:02:31 +09:00
Kogia-sima
e8beaef33b
Bump version (0.1.1 => 0.1.2)
2020-07-04 06:17:09 +09:00
Kogia-sima
f40926122b
feat: Add TemplateOnce::render_once_to_string method
2020-06-18 18:37:39 +09:00
Kogia-sima
b5d035493f
Bump version (0.1.0 => 0.1.1)
2020-06-18 18:04:02 +09:00
Kogia-sima
f2d5eb2b73
Bump version (0.0.5 => 0.1.0)
2020-06-15 12:17:19 +09:00
Kogia-sima
d1b6d2559a
feat: New feature flag (config)
2020-06-15 06:44:49 +09:00
Kogia-sima
2d994be4ff
feat: Global configuration file
2020-06-15 05:36:39 +09:00
Kogia-sima
5b4c13af3e
dep: Add dependency (yaml-rust)
2020-06-14 22:07:28 +09:00
Kogia-sima
25364a6bcc
Enhanced error message
2020-06-14 17:30:36 +09:00
Kogia-sima
733e1a6c63
Bump version (0.0.4 => 0.0.5)
2020-06-13 23:18:07 +09:00
Kogia-sima
98e11b1163
fix: Re-compile when child template is update.
2020-06-13 22:58:57 +09:00
Kogia-sima
8a83c2e278
Avoid method name collision in render* macros
...
fix #9
2020-06-13 13:16:39 +09:00
Kogia-sima
6ac39eee4c
refactor: refactor resolver code
2020-06-11 21:35:14 +09:00
Kogia-sima
d7a2ff8008
Fix include! implementation for Rust file
...
Also add tests for including Rust file
2020-06-11 19:43:01 +09:00
Kogia-sima
d302f30144
Format code
2020-06-11 19:42:22 +09:00
Kogia-sima
dc4d062b8d
Test for Error::kind()
2020-06-11 19:22:19 +09:00
Kogia-sima
7665690982
Change input/output directory for integration-tests
2020-06-11 15:31:55 +09:00
Kogia-sima
7cc4692951
Bump version (0.0.3 => 0.0.4)
2020-06-11 11:55:51 +09:00
Kogia-sima
c86effe90f
Remove unused function
2020-06-08 22:34:59 +09:00
Kogia-sima
0162e44ff8
Remove unused code
2020-06-07 23:23:45 +09:00
Kogia-sima
eeeb47ed84
Remove #[allow(dead_code)] for function
2020-06-07 23:20:36 +09:00
Kogia-sima
5c7065a411
Use proc_macro2::fallback::force() API
...
This api forces the use of proc-macro2's fallback implementation. This
allows to keep span information during parsing.
2020-06-07 20:52:38 +09:00
Kogia-sima
2e1b9b2c87
Specify proc-macro2 version
...
This specification is required to use `fallback::force()` API.
2020-06-07 20:42:55 +09:00
Kogia-sima
69d7d6c39c
Bump version (0.0.2 => 0.0.3)
2020-06-07 19:14:23 +09:00
Kogia-sima
fd3d224067
Refactor source code with rustfmt and clippy
...
[skip ci]
2020-06-07 17:58:52 +09:00
Kogia-sima
61ff466976
Add `rm_whitespace` option
2020-06-07 13:00:28 +09:00
Kogia-sima
9c4b6352d5
Add rm_whitespace option
2020-06-07 13:00:28 +09:00
Kogia-sima
94e7ce2e8a
TODO comments
...
[skip ci]
2020-06-07 11:49:15 +09:00
Kogia-sima
f3c9a21140
Resolve include! for Rust file correctly
2020-06-07 04:53:49 +09:00
Kogia-sima
b24861e158
Skip attribute if it is not wrapped with `template`
2020-06-07 03:44:30 +09:00
Kogia-sima
76abe1c0ac
Pop include path stack
2020-06-07 03:21:17 +09:00
Kogia-sima
e7c0992568
Export compiler config struct
2020-06-07 03:20:01 +09:00
Kogia-sima
6d07c43876
Strip the brake line at end of file
2020-06-07 01:25:52 +09:00
Kogia-sima
8e5b76f2ab
Ignore include! for rust file
2020-06-07 00:52:53 +09:00
Kogia-sima
7d77b755c6
Resolve child template path inside resolver
2020-06-07 00:43:10 +09:00
Kogia-sima
64ded9616a
resolve to relative path in include! by default
2020-06-06 23:43:41 +09:00
Kogia-sima
12174ff5c5
Implement include! macro
2020-06-06 22:49:01 +09:00
Kogia-sima
420d83521c
Add Config struct
2020-06-06 11:58:14 +09:00
Kogia-sima
08dacdd263
Add source code
2020-06-05 22:31:38 +09:00