1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#![crate_name = "string_cache"]
#![crate_type = "rlib"]
#![cfg_attr(test, deny(warnings))]
#![cfg_attr(all(test, feature = "unstable"), feature(test, filling_drop))]
#![cfg_attr(feature = "unstable", feature(unsafe_no_drop_flag))]
#![cfg_attr(feature = "heap_size", feature(plugin, custom_derive))]
#![cfg_attr(feature = "heap_size", plugin(heapsize_plugin))]
#[cfg(all(test, feature = "unstable"))] extern crate test;
#[cfg(feature = "log-events")] extern crate rustc_serialize;
#[cfg(feature = "heap_size")] extern crate heapsize;
#[cfg(test)] extern crate rand;
#[macro_use] extern crate lazy_static;
#[macro_use] extern crate debug_unreachable;
extern crate serde;
extern crate phf_shared;
pub use atom::Atom;
pub use namespace::{Namespace, QualName};
#[macro_export]
macro_rules! qualname {
("", $local:tt) => {
$crate::namespace::QualName {
ns: ns!(),
local: atom!($local),
}
};
($ns:tt, $local:tt) => {
$crate::namespace::QualName {
ns: ns!($ns),
local: atom!($local),
}
}
}
#[macro_export]
macro_rules! ns {
() => { $crate::Namespace(atom!("")) };
(html) => { $crate::Namespace(atom!("http://www.w3.org/1999/xhtml")) };
(xml) => { $crate::Namespace(atom!("http://www.w3.org/XML/1998/namespace")) };
(xmlns) => { $crate::Namespace(atom!("http://www.w3.org/2000/xmlns/")) };
(xlink) => { $crate::Namespace(atom!("http://www.w3.org/1999/xlink")) };
(svg) => { $crate::Namespace(atom!("http://www.w3.org/2000/svg")) };
(mathml) => { $crate::Namespace(atom!("http://www.w3.org/1998/Math/MathML")) };
}
include!(concat!(env!("OUT_DIR"), "/atom_macro.rs"));
#[cfg(feature = "log-events")]
#[macro_use]
pub mod event;
pub mod atom;
pub mod namespace;
pub mod shared;
#[doc(hidden)]
mod string_cache {
pub use atom;
pub use namespace;
}