aboutsummaryrefslogtreecommitdiffstats
path: root/components/atoms/build.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-04-25 10:44:10 +0200
committerSimon Sapin <simon.sapin@exyr.org>2017-04-26 13:04:27 +0900
commit0ff64bdc59e75c4fa16927db5cc8797bf60f9a36 (patch)
treed4312e064b4a99df6b8b08ec6081f642f2a8ea0f /components/atoms/build.rs
parent11469218661fe3076b255eba35c2b0736dcce500 (diff)
downloadservo-0ff64bdc59e75c4fa16927db5cc8797bf60f9a36.tar.gz
servo-0ff64bdc59e75c4fa16927db5cc8797bf60f9a36.zip
Allow 'decimal' and 'none' in `<counter-style-name>`
… other than in `@counter-style`.
Diffstat (limited to 'components/atoms/build.rs')
-rw-r--r--components/atoms/build.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/components/atoms/build.rs b/components/atoms/build.rs
index 4de629d288c..c8edc9bcd5a 100644
--- a/components/atoms/build.rs
+++ b/components/atoms/build.rs
@@ -12,7 +12,20 @@ use std::path::Path;
fn main() {
let static_atoms = Path::new(&env::var("CARGO_MANIFEST_DIR").unwrap()).join("static_atoms.txt");
let static_atoms = BufReader::new(File::open(&static_atoms).unwrap());
- string_cache_codegen::AtomType::new("Atom", "atom!")
+ let mut atom_type = string_cache_codegen::AtomType::new("Atom", "atom!");
+
+ macro_rules! predefined {
+ ($($name: expr,)+) => {
+ {
+ $(
+ atom_type.atom($name);
+ )+
+ }
+ }
+ }
+ include!("../style/counter_style/predefined.rs");
+
+ atom_type
.atoms(static_atoms.lines().map(Result::unwrap))
.write_to_file(&Path::new(&env::var("OUT_DIR").unwrap()).join("atom.rs"))
.unwrap();