mesdoc/
constants.rs

1// attr class
2pub const ATTR_CLASS: &str = "class";
3// default elements initial node length
4pub const DEF_NODES_LEN: usize = 5;
5// priorities
6/*
7** different from css selector priority
8** most time, the name selector parse faster than attribute selector
9** https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
10*/
11pub const PRIORITY_ALL_SELECTOR: u32 = 0;
12pub const PRIORITY_ATTR_SELECTOR: u32 = 10;
13pub const PRIORITY_PSEUDO_SELECTOR: u32 = 10;
14pub const PRIORITY_NAME_SELECTOR: u32 = 100;
15pub const PRIORITY_CLASS_SELECTOR: u32 = 1000;
16pub const PRIORITY_ID_SELECTOR: u32 = 10000;
17// selector names
18pub const NAME_SELECTOR_ALL: &str = "all";
19pub const NAME_SELECTOR_ATTR: &str = "attr";
20pub const NAME_SELECTOR_NAME: &str = "name";
21pub const NAME_SELECTOR_CLASS: &str = "class";
22pub const NAME_SELECTOR_ID: &str = "id";