Skip to content

Commit cee43bd

Browse files
author
bors-servo
authored
Auto merge of #268 - Ygg01:xhtml5ever, r=SimonSapin,Ygg01
Xhtml5ever Ok, this is a large one. Fixes #266, fixes #261, fixes #210. It moves html5ever into separate folder, renames html5ever macros markup5ever and stores common code there. Here is short summary of what I know is and isn't done. - [x] Make every crate in the repo use a single workspace - [x] Make sure Travis-CI is running every test - [x] Rename the the html5ever_atoms crate to markup5ever and update html5ever and xml5ever to use it. - [x] Increment version numbers - [x] Make it so that users of either html5ever or xml5ever don’t need to have an explicit dependency to markup5ever - [x] Export QualName #210 - [x] let markup5ever generate entities.json #261 - [ ] **Move TokenSink to markup5ever** - [x] Move TreeSink to markup5ever - [x] Move BufferQueue to markup5ever - [x] Move SmallCharSet to markup5ever - [ ] **Deal with driver.rs** <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/html5ever/268) <!-- Reviewable:end -->
2 parents 10b48e4 + 50bcef5 commit cee43bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+1779
-5370
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[submodule "html5lib-tests"]
2-
path = html5lib-tests
2+
path = html5ever/html5lib-tests
33
url = https://github.com/html5lib/html5lib-tests
44
[submodule "xml5lib-tests"]
55
path = xml5ever/xml5lib-tests

COPYRIGHT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This project is copyright 2014, The html5ever Project Developers (given in
1+
This project is Copyright 2014-2017 , The html5ever Project Developers (given in
22
the file AUTHORS).
33

44
Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or

Cargo.toml

Lines changed: 6 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,9 @@
1-
[package]
2-
3-
name = "html5ever"
4-
version = "0.15.0"
5-
authors = [ "The html5ever Project Developers" ]
6-
license = "MIT / Apache-2.0"
7-
repository = "https://github.com/servo/html5ever"
8-
description = "High-performance browser-grade HTML5 parser"
9-
documentation = "https://docs.rs/html5ever"
10-
build = "build.rs"
11-
12-
[lib]
13-
name = "html5ever"
14-
15-
# https://github.com/rust-lang/cargo/issues/1512
16-
doctest = false
17-
18-
[[test]]
19-
name = "tree_builder"
20-
harness = false
21-
22-
[[test]]
23-
name = "tokenizer"
24-
harness = false
25-
26-
[[test]]
27-
name = "serializer"
28-
29-
[[bench]]
30-
name = "tokenizer"
31-
harness = false
32-
33-
[features]
34-
unstable = ["tendril/unstable"]
35-
heap_size = ["heapsize", "heapsize_derive", "html5ever-atoms/heap_size"]
36-
37-
[dependencies]
38-
log = "0"
39-
phf = "0.7"
40-
mac = "0"
41-
tendril = "0.2.2"
42-
heapsize = { version = "0.3", optional = true }
43-
heapsize_derive = { version = "0.1", optional = true }
44-
html5ever-atoms = { version = "0.3", path = "./atoms" }
45-
46-
[dev-dependencies]
47-
rustc-serialize = "0.3.15"
48-
rustc-test = "0.1.3"
49-
50-
[build-dependencies]
51-
phf_codegen = "0.7.3"
52-
quote = "0.3.3"
53-
rustc-serialize = "0.3.15"
54-
syn = { version = "0.11", features = ["full", "visit"] }
1+
[workspace]
2+
members = [
3+
"markup5ever",
4+
"html5ever",
5+
"xml5ever"
6+
]
557

568
[profile.dev]
579
debug = false

atoms/lib.rs

Lines changed: 0 additions & 81 deletions
This file was deleted.

build.rs

Lines changed: 0 additions & 74 deletions
This file was deleted.

html5ever/Cargo.toml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
[package]
2+
3+
name = "html5ever"
4+
version = "0.16.0"
5+
authors = [ "The html5ever Project Developers" ]
6+
license = "MIT / Apache-2.0"
7+
repository = "https://github.com/servo/html5ever"
8+
description = "High-performance browser-grade HTML5 parser"
9+
documentation = "https://docs.rs/html5ever"
10+
build = "build.rs"
11+
12+
[lib]
13+
name = "html5ever"
14+
15+
doctest = true
16+
17+
[[test]]
18+
name = "tree_builder"
19+
harness = false
20+
21+
[[test]]
22+
name = "tokenizer"
23+
harness = false
24+
25+
[[test]]
26+
name = "serializer"
27+
28+
[[bench]]
29+
name = "tokenizer"
30+
harness = false
31+
32+
[features]
33+
unstable = ["tendril/unstable"]
34+
heap_size = ["markup5ever/heap_size"]
35+
36+
[dependencies]
37+
log = "0"
38+
mac = "0"
39+
tendril = "0.2.2"
40+
markup5ever = { version = "0.1", path = "../markup5ever" }
41+
42+
[dev-dependencies]
43+
rustc-serialize = "0.3.15"
44+
rustc-test = "0.1.3"
45+
46+
[build-dependencies]
47+
quote = "0.3.3"
48+
syn = { version = "0.11", features = ["full", "visit"] }

benches/tokenizer.rs renamed to html5ever/benches/tokenizer.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2014 The html5ever Project Developers. See the
1+
// Copyright 2014-2017 The html5ever Project Developers. See the
22
// COPYRIGHT file at the top-level directory of this distribution.
33
//
44
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
@@ -8,7 +8,6 @@
88
// except according to those terms.
99

1010
extern crate test;
11-
extern crate tendril;
1211
extern crate html5ever;
1312

1413
use std::{fs, env, cmp};
@@ -19,9 +18,8 @@ use test::{black_box, Bencher, TestDesc, TestDescAndFn};
1918
use test::{DynTestName, DynBenchFn, TDynBenchFn};
2019
use test::ShouldPanic::No;
2120

22-
use tendril::{ByteTendril, StrTendril, ReadExt, SliceExt};
23-
use html5ever::tokenizer::{TokenSink, Token, Tokenizer, TokenizerOpts, TokenSinkResult};
24-
use html5ever::tokenizer::buffer_queue::BufferQueue;
21+
use html5ever::tokenizer::{BufferQueue, TokenSink, Token, Tokenizer, TokenizerOpts, TokenSinkResult};
22+
use html5ever::tendril::*;
2523

2624
struct Sink;
2725

html5ever/build.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
#[macro_use] extern crate quote;
11+
extern crate syn;
12+
13+
use std::env;
14+
use std::path::Path;
15+
16+
#[path = "macros/match_token.rs"]
17+
mod match_token;
18+
19+
fn main() {
20+
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
21+
22+
let rules_rs = Path::new(&manifest_dir).join("src/tree_builder/rules.rs");
23+
match_token::expand_match_tokens(
24+
&rules_rs,
25+
&Path::new(&env::var("OUT_DIR").unwrap()).join("rules.rs"));
26+
27+
println!("cargo:rerun-if-changed={}", rules_rs.display());
28+
}
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)