112 Commits

Author SHA1 Message Date
Connor Skees
94fe52a81d support compressed lists and number values 2021-07-25 09:57:55 -04:00
Connor Skees
3ced8feed5 avoid cloning selector to determine visibility 2021-07-25 02:21:25 -04:00
Connor Skees
3ab2aa961a don't clone in order to construct lexer 2021-07-24 20:10:10 -04:00
Connor Skees
fccf93cd96 originals uses pointer equality check, rather than true equality 2021-07-24 14:42:21 -04:00
Connor Skees
6de7b113cf avoid collecting in pseudo selector extension (small perf win) 2021-07-21 23:35:19 -04:00
Connor Skees
8e08a5de4f support special fns inside min and max 2021-07-12 01:59:30 -04:00
Connor Skees
adfecfa83e remove peekmore dependency 2021-07-11 15:12:46 -04:00
Connor Skees
5c61f8ccaa :is is alias for :matches 2021-07-04 11:48:13 -04:00
Connor Skees
2b72a1fc0d avoid deep recursion in extend 2021-07-04 11:32:19 -04:00
Connor Skees
8ea601ee43 nightly clippy 2021-07-04 01:24:08 -04:00
Connor Skees
150ba14b74 clippy 2021-07-03 19:15:31 -04:00
Connor Skees
b631ad78bc rustfmt 2021-07-03 18:46:22 -04:00
Connor Skees
f17a1e6da2 placate clippy 2020-11-16 03:25:55 -05:00
Connor Skees
79955d921c simplify extension functions 2020-08-19 03:07:21 -04:00
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