1 | // Copyright 2014-2017 The html5ever Project Developers. See the |
2 | // COPYRIGHT file at the top-level directory of this distribution. |
3 | // |
4 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or |
5 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license |
6 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your |
7 | // option. This file may not be copied, modified, or distributed |
8 | // except according to those terms. |
9 | |
10 | pub use tendril; |
11 | |
12 | /// Create a [`SmallCharSet`], with each space-separated number stored in the set. |
13 | /// |
14 | /// # Examples |
15 | /// |
16 | /// ``` |
17 | /// # #[macro_use ] extern crate markup5ever; |
18 | /// # fn main() { |
19 | /// let set = small_char_set!(12 54 42); |
20 | /// assert_eq!(set.bits, |
21 | /// 0b00000000_01000000_00000100_00000000_00000000_00000000_00010000_00000000); |
22 | /// # } |
23 | /// ``` |
24 | /// |
25 | /// [`SmallCharSet`]: struct.SmallCharSet.html |
26 | #[macro_export ] |
27 | macro_rules! small_char_set ( ($($e:expr)+) => ( |
28 | $ crate ::SmallCharSet { |
29 | bits: $( (1 << ($e as usize)) )|+ |
30 | } |
31 | )); |
32 | |
33 | include!(concat!(env!("OUT_DIR" ), "/generated.rs" )); |
34 | |
35 | pub mod data; |
36 | #[macro_use ] |
37 | pub mod interface; |
38 | pub mod serialize; |
39 | mod util { |
40 | pub mod buffer_queue; |
41 | pub mod smallcharset; |
42 | } |
43 | |
44 | pub use interface::{Attribute, ExpandedName, QualName}; |
45 | pub use util::smallcharset::SmallCharSet; |
46 | pub use util::*; |
47 | |