98 Commits

Author SHA1 Message Date
Connor Skees
f60fb26ca0 do not panic when extending by compound selector with parent 2020-08-16 19:09:08 -04:00
Connor Skees
0254517095 refactor errors using Parser::expect_char 2020-08-06 21:36:11 -04:00
Connor Skees
8fabda6363 use back() rather than indexing at len - 1 2020-08-05 03:26:50 -04:00
Connor Skees
61ef52eb3f replace .get(0) with .first() 2020-08-05 03:09:10 -04:00
Connor Skees
b2e7270681 resolve panic when extending certain psuedo selectors containing combinators without rhs selector 2020-08-04 23:18:16 -04:00
Connor Skees
c2384595e8 improve span context in @extend, removing some potential panics 2020-07-12 13:09:23 -04:00
Connor Skees
b199984170 avoid superfluous clone+collect in extend_compound 2020-07-09 11:17:43 -04:00
Connor Skees
5f938315dc box attribute selector, significantly reducing the size of the simple selector enum 2020-07-07 21:00:20 -04:00
Connor Skees
69089a13cf remove superfluous reference 2020-07-07 15:02:27 -04:00
Connor Skees
4379e1e3b7 lazily compute normalized name of psuedo selector 2020-07-07 14:48:02 -04:00
Connor Skees
1ae9cdbb23 box selector field of pseudo selectors
gives a ~3% improvement to bootstrap by decreasing size of
`SimpleSelector` to 88 bytes
2020-07-07 14:30:35 -04:00
Connor Skees
60c9327cf3 remove superfluous clone and indexing for loops from @extend 2020-07-06 12:49:13 -04:00
Connor Skees
91ff4c10b4 resolve clippy lints 2020-07-04 13:44:52 -04:00
Connor Skees
fc36a7a1e8 remove superfluous clones in weave() 2020-07-04 13:43:09 -04:00
Connor Skees
05f5bc141a avoid cloning all extensions for every selector 2020-07-04 13:16:52 -04:00
Connor Skees
95c8b8d123 remove clone from extend_simple 2020-07-04 13:10:51 -04:00
Connor Skees
d79488b00f remove superfluous clone from add_selector() 2020-07-04 12:58:04 -04:00
Connor Skees
52ecd1e2d0 optimize ExtendedSelector::into_selector
when there is only one reference to an `ExtendedSelector`, the selector
will no longer do unnecessary cloning. this is a significant improvement
as previously we were cloning *every* selector multiple times. note that
this is optimization only occurs when the selector is being emitted.
2020-07-04 12:38:09 -04:00
Connor Skees
ca861d488b optimize common case of previously seen simple selectors 2020-07-04 12:11:01 -04:00
Connor Skees
c52a0c7dd9 remove or pattern todos
clippy now has a lint for them
2020-07-04 11:33:31 -04:00
Connor Skees
f6f4d8ab1b hash ptr rather than value of extended selector
this change *doubles* speed of the `huge.scss` benchmark. it may not be
wholly sound, though. I haven't come across a test case that can make
this fail, but that's not to say one doesn't exist.
2020-07-03 21:09:31 -04:00
Connor Skees
c66ecdd57d use HashSet internally inside SelectorHashSet 2020-07-03 20:55:02 -04:00
Connor Skees
192d18c2ac explain why we don't use a HashSet for SelectorHashSet 2020-07-03 20:34:03 -04:00
Connor Skees
30a3a46b2d fix longstanding @extend bug related to selector lists 2020-07-03 19:58:43 -04:00
Connor Skees
596def3906 refactor value evaluation 2020-07-03 12:38:20 -04:00
Connor Skees
ae77325ad0 consolidate implementation of unvendor() 2020-07-02 10:40:43 -04:00
Connor Skees
f476f4af25 no longer strip whitespace at the end of selectors
the whitespace can sometimes be part of an escape, e.g. `\ `
2020-06-30 06:43:26 -04:00
Connor Skees
c7608fce4e convert immutable Strings to Box<str> in Pseudo 2020-06-28 05:10:34 -04:00
ConnorSkees
6baf0d2340 reduce size of Namespace and Toplevel 2020-06-26 05:37:57 -04:00
ConnorSkees
e5e3943e5c allow clippy::single_match 2020-06-24 07:05:14 -04:00
ConnorSkees
e96fc409e9 add debug_assert to is_super_selector for pseudo 2020-06-24 06:37:26 -04:00
ConnorSkees
a82de89adc complex selector equality ignores line_break 2020-06-24 06:20:36 -04:00
ConnorSkees
4610a30024 resolve @extend issues related to attrbitute equality 2020-06-24 06:11:29 -04:00
ConnorSkees
dc3208cc05 remove devour_whitespace from selector parsing 2020-06-23 04:57:06 -04:00
ConnorSkees
173a896ab0 resolve clippy lints 2020-06-23 04:28:54 -04:00
ConnorSkees
84328f0e2c add remaining selector-unify tests 2020-06-23 04:28:54 -04:00
ConnorSkees
7f8dc52e24 wrap extended selectors in Rc<RefCell<T>> 2020-06-23 04:28:54 -04:00
ConnorSkees
0650f0ebcf super selectors are resolved eagerly 2020-06-23 04:28:54 -04:00
ConnorSkees
991be977ac resolve regression related to equality of selectors 2020-06-23 04:28:54 -04:00
ConnorSkees
81aa6ee4b8 fix how equality is resolved between pseudo selectors 2020-06-23 04:28:37 -04:00
ConnorSkees
eb6f0f3451 remove superfluous lifetimes and returns 2020-06-22 12:41:59 -04:00
ConnorSkees
a3a33db47a improve selector error handling 2020-06-22 12:39:09 -04:00
ConnorSkees
4bc44bdd15 use dummy value for codeblock language 2020-06-20 06:34:15 -04:00
ConnorSkees
9a5c4d0816 put no_run between ticks 2020-06-20 06:20:35 -04:00
ConnorSkees
5a97e9d09e resolve merge conflicts 2020-06-20 06:16:42 -04:00
ConnorSkees
bc1c15ad21 resolve merge conflicts 2020-06-20 06:10:48 -04:00
ConnorSkees
195079de86 initial implementation of @extend 2020-06-20 06:09:12 -04:00
ConnorSkees
47c4a421ac upgrade dependencies 2020-06-19 22:47:06 -04:00
ConnorSkees
2cd81ccb0f bump version to 0.9.0 2020-06-16 20:50:41 -04:00
Connor Skees
2ad1b70f61
Refactor parsing into struct, rather than standalone functions
reimplement parsing
2020-06-16 20:37:10 -04:00