Connor Skees
05b6b539ad
avoid creating unnecessary errors
...
previously, when attempting to locate a mixin/fn/variable, we would
check if it existing simply by calling `get_{mixin,fn,var}`. this caused
*large* performance regressions in bootstrap, where almost 15% of the
execution time was spent in these functions. the cause for this was that
`get_*` both allocates a new String and boxes the error.
2020-07-08 20:26:54 -04:00
Connor Skees
11170ac5b3
remove unused Content::new
method
2020-07-08 19:34:39 -04:00
Connor Skees
980b2d9076
prefer append over extend in callarg parsing
2020-07-08 19:25:35 -04:00
Connor Skees
5ce9f78103
simplify by using mem::swap instead of mem::take
2020-07-08 18:19:23 -04:00
Connor Skees
02efd09d80
avoid cloning the entire scope
2020-07-08 17:52:37 -04:00
Connor Skees
316316d3a0
invert if stmt in parsing @content
2020-07-08 15:32:04 -04:00
Connor Skees
47902c077c
refactor how scopes are calculated
2020-07-08 14:51:04 -04:00
Connor Skees
3a5526ab26
avoid unnecessary allocations when converting String
to Identifier
2020-07-08 10:38:25 -04:00
Connor Skees
558b49af6d
better document purpose of Identifier
2020-07-08 10:25:37 -04:00
Connor Skees
56a5abb05c
parsing interpolation no longer allocates buffer
2020-07-08 10:19:57 -04:00
Connor Skees
4b0b644264
refactor control flow parsing into separate module
2020-07-08 10:15:54 -04:00
Connor Skees
3f3fd97872
test for crazy interpolation in @for
from value
2020-07-08 09:52:07 -04:00
Connor Skees
978984ae15
refactor how to value in @for
is parsed
2020-07-08 09:25:35 -04:00
Connor Skees
b42ae61435
test for crazy interpolation inside @if
2020-07-08 09:08:25 -04:00
Connor Skees
0c0c154b66
avoid cloning identifiers for functions
2020-07-07 21:11:45 -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
6a83db7404
resolve clippy lints
2020-07-07 19:50:17 -04:00
Connor Skees
b729d7b257
move Comment
enum to common
2020-07-07 19:37:48 -04:00
Connor Skees
fd4073aaca
further reduce allocations in @if
2020-07-07 19:36:13 -04:00
Connor Skees
11e859705a
remove value_from_vec
where unnecessary
2020-07-07 18:06:28 -04:00
Connor Skees
aa209702d2
reduce allocations for @if
2020-07-07 17:50:18 -04:00
Connor Skees
33f81f5bbe
simplify Scope::get_var
2020-07-07 17:36:52 -04:00
Connor Skees
ef25481420
invert if statement
2020-07-07 17:26:10 -04:00
Connor Skees
9b4815e75f
avoid unnecessary cloning of identifiers
2020-07-07 17:22:18 -04:00
Connor Skees
817c808826
dont allocate @if
body unless necessary
2020-07-07 17:13:13 -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
e915e5cd31
test for hsla conversion to named color
2020-07-07 14:14:05 -04:00
Connor Skees
eb50381236
color equality only checks rgba value and normalizes channels
2020-07-07 12:30:33 -04:00
Connor Skees
35da511860
replace eat
terminology with parse
2020-07-07 12:02:59 -04:00
Connor Skees
6faf30795e
add ignored scope tests for mixins and functions
2020-07-07 12:00:11 -04:00
Connor Skees
25862a5af8
do not strip whitespace before comma in psuedo selector
2020-07-07 11:37:20 -04:00
Connor Skees
df60ef094c
allow media queries to contain a single identifier wrapped in parens
2020-07-07 11:23:09 -04:00
Connor Skees
b56a4a3fcc
map equality considers both key and value
2020-07-07 10:55:37 -04:00
Connor Skees
790573195f
resolve clippy lints
2020-07-07 01:13:15 -04:00
Connor Skees
57562b52d3
map equality is independent of order
2020-07-07 01:06:22 -04:00
Connor Skees
6138efc059
refactor value equality checks
2020-07-07 00:01:34 -04:00
Connor Skees
49607da222
fix @each
bug involving list containing map with multiple elements
2020-07-06 23:11:46 -04:00
Connor Skees
7971bfe98b
improve inspect output for arglists with 1 arg
2020-07-06 22:31:30 -04:00
Connor Skees
ba7a368684
allow empty arglists in builtin map functions
2020-07-06 22:25:27 -04:00
Connor Skees
70cc7afdaf
use inspect for builtin function error messages
2020-07-06 22:25:27 -04:00
Connor Skees
1055060c2d
Merge pull request #20 from redzic/colored_help
...
Add colored help output
2020-07-06 22:23:11 -04:00
Yusuf Redzic
ae73c733fb
Add colored help output
2020-07-06 21:09:25 -05:00
Connor Skees
37c1ada664
update passing tests
2020-07-06 20:08:23 -04:00
Connor Skees
e1e643d286
emit @import
when importing a url or .css file
2020-07-06 19:47:12 -04:00
Connor Skees
4edc324fcd
remove superfluous whitespace from media query involving and
2020-07-06 18:59:21 -04:00
Connor Skees
22cc36b578
more robustly emit empty arglists
2020-07-06 18:41:50 -04:00
Connor Skees
9936656077
handle non-string keys in splatted map
2020-07-06 17:54:55 -04:00
Connor Skees
7c320ae9a2
handle edge case of single list containing map used in @each
2020-07-06 16:10:09 -04:00