Commit graph

74 commits

Author SHA1 Message Date
CreepySkeleton
ef120ab2d0 Transfer codebase from ParseResult to abort! 2020-08-30 23:28:49 +03:00
Byte
a10130a9ac
Switch to 3rd party quote macro ()
* Add proc_macro2 and quote dependencies

* Completly switch over to proc_macro2 where possible

* Remove unessesary ::from casts

* Remove pendantic cast that i missed

* Make Builder::push_tokens accept TokenStream

* Remove stray commented out code

* Reword unclear comment on `Span` to a todo item

* Move comment closer to its intended line

* Use into instead of explicit conversion
2020-07-12 21:42:14 +10:00
Chris Wong
34a79ee706 Release 0.22 2020-06-20 19:57:51 +10:00
Byte
03e03e2e7d
Replace Span::def_site and remove #![feature(proc_macro_def_site)] () 2020-06-14 22:29:51 +10:00
Chris Wong
5e2c9e26a8 Release 0.21.0 2019-07-01 21:03:44 +12:00
Chris Wong
b86ba7af85 Use absolute paths in generated code
Closes 
2019-03-28 20:18:12 +13:00
Chris Wong
39f543c819 Rust 2018 2019-03-16 20:18:58 +13:00
Chris Wong
6de2cf1998 Release 0.20.0 2019-01-17 16:01:55 +13:00
Chris Wong
0ccb2829c9 Release 0.19.0 2018-10-20 17:15:57 +13:00
Chris Wong
365d0ab956 Update to rustc 1.31.0-nightly (77af31408 2018-10-11) 2018-10-12 19:26:16 +13:00
Chris Wong
6aee65a6f1 Update to rustc 1.31.0-nightly (fddcd316a 2018-10-05) 2018-10-06 18:03:15 +13:00
Chris Wong
35d5204cab Update to rustc 1.30.0-nightly (9395f0af7 2018-09-02) 2018-09-03 20:01:39 +12:00
Chris Wong
f17e21423e Remove #![feature(use_extern_macros)] 2018-08-18 16:25:15 -07:00
Chris Wong
de6f654614 Release 0.18.1 2018-07-18 20:03:44 +12:00
Chris Wong
8dbcdab2bf Update to rustc 1.29.0-nightly (1ecf6929d 2018-07-16)
Closes 
2018-07-18 19:41:47 +12:00
Chris Wong
aadc749715 Release 0.18.0 2018-07-15 21:46:16 +12:00
Chris Wong
12282093eb Use diagnostic API everywhere 2018-06-22 21:28:35 +12:00
Chris Wong
67b6fb05e9 Release 0.17.5 2018-05-26 11:57:51 +12:00
Chris Wong
2455de589c Update to rustc 1.27.0-nightly (2f2a11dfc 2018-05-16) 2018-05-17 20:55:29 +12:00
Chris Wong
9d90e94c87
Change macro internals to use an explicit AST () 2018-05-17 20:38:44 +12:00
Chris Wong
7c63fc138a Release 0.17.4 2018-05-02 20:49:17 +12:00
Chris Stadler
e606e64ef2 Enable proc_macro_non_items feature flag 2018-04-28 12:59:24 +12:00
Chris Wong
41f7744fe1 Release 0.17.3 2018-04-21 17:20:42 +12:00
Chris Wong
dd9d892b8d Fix up some minor issues 2018-04-16 20:29:32 +12:00
Coleman McFarland
f75da83a60 Pre-allocate sufficient size for our output String 2018-04-16 01:06:19 -07:00
Coleman McFarland
0f453a5568 Refactor to keep up with changes to proc_macro
Instead of a `kind` field containting a `TokenNode` variant, a
TokenTree is now an enum with variants of different types (Literal, Op,
Term, etc). Note that a TokenTree could be a sequence of TokenTrees if it is a
Group variant.

Other notes:

I'm unsure about the set_span call in Builder::emit_if, but I did not want to
throw away the passed in Span.

Parsing relies on destructuring references to the values associated with
TokenTree enum variants

It doesn't seem as easy to compose/chain TokenStreams as it is to
collect a Vec<TokenTree> into a TokenStream. There is probably some
iterator API I could use instead. See `match_arms` and build.rs

Refs 
2018-04-12 14:19:26 -07:00
Chris Wong
62298aec55 Release 0.17.2 2017-11-19 20:12:38 +13:00
Chris Wong
cc833dd624 Update to rustc 1.23.0-nightly (6160040d8 2017-11-18) 2017-11-19 19:55:11 +13:00
Chris Wong
5cd51481c9 Rename Renderer to Builder 2017-08-12 17:41:54 +12:00
Chris Wong
9487dbc3a7 Move some code around 2017-08-12 16:21:13 +12:00
Chris Wong
080b461f1b Release 0.17.1 2017-08-11 21:15:20 +12:00
Chris Wong
752c4805e4 Release 0.17.0 2017-08-04 22:22:38 +12:00
Chris Wong
3de5f7f3e9 Move lints into their own maud_lints crate 2017-07-30 22:18:26 +12:00
Chris Wong
2213c0dc32 Move escaping routines into a shared maud_htmlescape crate 2017-07-29 20:03:00 +12:00
Chris Wong
fd7e000cda TokenTreeIter values can be cloned now 2017-07-29 13:24:40 +12:00
Chris Wong
e0c7fcf055 Initial stab at porting to new proc macro interface 2017-07-23 13:58:42 +12:00
Chris Wong
04eb61e870 Use docs.rs for hosting API documentation 2017-06-19 21:25:19 +12:00
Chris Wong
348712f3f4 Add #![doc(html_root_url = "...")] attribute 2017-05-13 14:16:41 +12:00
Chris Wong
dde603757d Rename PResult to ParseResult 2017-04-22 17:29:56 +12:00
Chris Wong
dfe721c6b7 Update to rustc 1.18.0-nightly (1785bca51 2017-04-21)
Closes 
2017-04-22 17:29:56 +12:00
Chris Wong
fe08789e3f Make PResult type private
Not sure why it was public in the first place
2017-02-11 17:19:12 +13:00
Chris Wong
c849d9efdf Use if_chain from crates.io 2016-12-29 12:20:08 +13:00
Chris Wong
f991ebaa78 Lint against PreEscaped("<!DOCTYPE html>")
See 
2016-12-27 21:27:54 +13:00
Chris Wong
7f7deb7af5 Remove #![feature(question_mark)]
Apparently that feature is stable now
2016-10-17 21:41:33 +13:00
Chris Wong
f12efe4299 Rewrite everything to use Strings instead of writers
After fiddling around with zero-allocation solutions, I concluded that
all non-allocating approaches are too annoying to work with in realistic
code. Using closures leads to yak-shaving with lifetimes; and because
Iron needs to take ownership of the response body we often end up
cloning the input data anyway.

Removing this constraint has let me simplify the entire system, removing
a net 300 lines from the library. The `html!` macro no longer takes a
writer, and instead returns a `PreEscaped<String>`. This means that the
result of an `html!` can be spliced directly into another `html!`,
removing the need for the `impl Template` rigmarole.

To rub it in, benchmarks show the new code is in fact *faster* than it
was before. How lovely.
2016-09-23 19:22:22 +12:00
Chris Wong
aded75f01f Add some juicy impl Trait niceness 2016-08-15 20:32:39 +12:00
Chris Wong
166296db30 Update Rust 2016-07-03 16:55:45 +12:00
Chris Wong
00ec443326 Update Rust
2016-04-27 12:10:37 +12:00
Chris Wong
8492259638 Use the new ? syntax (so purty) 2016-03-22 23:31:23 +13:00
Chris Wong
8d0ad20f74 Update Rust 2016-01-01 11:43:59 +13:00