Support nested invocations of html macro

This commit is contained in:
David Tolnay 2018-11-18 02:23:18 -08:00
parent 893566118d
commit 0ec3be89cc
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
5 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,4 @@
#![recursion_limit = "256"]
#![feature(proc_macro_hygiene, decl_macro)] #![feature(proc_macro_hygiene, decl_macro)]
extern crate rocket; extern crate rocket;

View File

@ -1,3 +1,5 @@
#![recursion_limit = "256"]
extern crate stdweb; extern crate stdweb;
extern crate typed_html; extern crate typed_html;
extern crate typed_html_macros; extern crate typed_html_macros;

View File

@ -18,7 +18,7 @@ proc-macro = true
lalrpop-util = "0.16.1" lalrpop-util = "0.16.1"
ansi_term = "0.11.0" ansi_term = "0.11.0"
proc-macro2 = { version = "0.4.24", features = ["nightly"] } proc-macro2 = { version = "0.4.24", features = ["nightly"] }
proc-macro-hack = "0.5.1" proc-macro-hack = "0.5.2"
quote = "0.6.10" quote = "0.6.10"
[build-dependencies] [build-dependencies]

View File

@ -23,4 +23,5 @@ language-tags = "0.2.2"
http = "0.1.13" http = "0.1.13"
htmlescape = "0.3.1" htmlescape = "0.3.1"
stdweb = "0.4.10" stdweb = "0.4.10"
proc-macro-hack = "0.5.1" proc-macro-hack = "0.5.2"
proc-macro-nested = "0.1.0"

View File

@ -4,6 +4,7 @@
//! # Quick Preview //! # Quick Preview
//! //!
//! ``` //! ```
//! # #![recursion_limit = "128"]
//! # use typed_html::{html, for_events}; //! # use typed_html::{html, for_events};
//! # use typed_html::dom::{DOMTree, VNode}; //! # use typed_html::dom::{DOMTree, VNode};
//! # use typed_html::types::Metadata; //! # use typed_html::types::Metadata;
@ -198,13 +199,14 @@ extern crate http;
extern crate language_tags; extern crate language_tags;
extern crate mime; extern crate mime;
extern crate proc_macro_hack; extern crate proc_macro_hack;
extern crate proc_macro_nested;
extern crate stdweb; extern crate stdweb;
extern crate strum; extern crate strum;
extern crate typed_html_macros; extern crate typed_html_macros;
use proc_macro_hack::proc_macro_hack; use proc_macro_hack::proc_macro_hack;
#[proc_macro_hack] #[proc_macro_hack(support_nested)]
pub use typed_html_macros::html; pub use typed_html_macros::html;
pub mod dom; pub mod dom;