blob: 9bb46781a14405224e5511f789ce7016008c4aeb (
plain)
| 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
 | ///http://docutils.sourceforge.net/docs/ref/doctree.html
///serves as AST
pub mod elements;
pub mod element_categories;
pub mod extra_attributes;
pub mod attribute_types;
pub use self::elements::*; //Element,CommonAttributes,
pub use self::extra_attributes::ExtraAttributes;
pub use self::element_categories::HasChildren;
#[test]
fn test_imperative() {
	let mut doc = Document::default();
	let mut title = Title::default();
	title.append_child("Hi");
	doc.append_child(title);
	
	println!("{:?}", doc);
}
#[test]
fn test_descriptive() {
	let doc = Document::with_children(vec![
		Title::with_children(vec![
			"Hi".into()
		]).into()
	]);
	
	println!("{:?}", doc);
}
 |