| 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 | #![ allow(unexpected_cfgs)] | 
|---|
| 11 | // This error is coming from code generated by PHF which we cannot directly fix | 
|---|
| 12 | #![ allow(clippy::empty_line_after_doc_comments)] | 
|---|
| 13 |  | 
|---|
| 14 | pub use tendril; | 
|---|
| 15 |  | 
|---|
| 16 | /// Create a [`SmallCharSet`], with each space-separated number stored in the set. | 
|---|
| 17 | /// | 
|---|
| 18 | /// # Examples | 
|---|
| 19 | /// | 
|---|
| 20 | /// ``` | 
|---|
| 21 | /// # #[ macro_use] extern crate markup5ever; | 
|---|
| 22 | /// # fn main() { | 
|---|
| 23 | /// let set = small_char_set!(12 54 42); | 
|---|
| 24 | /// assert_eq!(set.bits, | 
|---|
| 25 | ///            0b00000000_01000000_00000100_00000000_00000000_00000000_00010000_00000000); | 
|---|
| 26 | /// # } | 
|---|
| 27 | /// ``` | 
|---|
| 28 | /// | 
|---|
| 29 | /// [`SmallCharSet`]: struct.SmallCharSet.html | 
|---|
| 30 | #[ macro_export] | 
|---|
| 31 | macro_rules! small_char_set ( ($($e:expr)+) => ( | 
|---|
| 32 | $ crate ::SmallCharSet { | 
|---|
| 33 | bits: $( (1 << ($e as usize)) )|+ | 
|---|
| 34 | } | 
|---|
| 35 | )); | 
|---|
| 36 |  | 
|---|
| 37 | include!(concat!(env!( "OUT_DIR" ), "/generated.rs")); | 
|---|
| 38 |  | 
|---|
| 39 | pub mod data; | 
|---|
| 40 | #[ macro_use] | 
|---|
| 41 | pub mod interface; | 
|---|
| 42 | pub mod serialize; | 
|---|
| 43 | mod util { | 
|---|
| 44 | pub mod buffer_queue; | 
|---|
| 45 | pub mod smallcharset; | 
|---|
| 46 | } | 
|---|
| 47 |  | 
|---|
| 48 | pub use interface::{Attribute, ExpandedName, QualName}; | 
|---|
| 49 | pub use util::smallcharset::SmallCharSet; | 
|---|
| 50 | pub use util::*; | 
|---|
| 51 |  | 
|---|