97 Commits

Author SHA1 Message Date
ConnorSkees
6820416c8d resolve merge conflicts 2020-05-25 16:15:42 -04:00
ConnorSkees
a7d6af9cc8 clean up AtRuleKind docs 2020-05-25 15:52:53 -04:00
ConnorSkees
bb53aaab8a replace std::borrow::Cow with beef::Cow 2020-05-25 13:09:20 -04:00
ConnorSkees
6d76e1518a refactor away many unwraps 2020-05-25 00:57:59 -04:00
ConnorSkees
ec83a9dff7 clippy 2020-05-24 17:41:24 -04:00
ConnorSkees
8d4b4bedbe remove unwrap in peek_ident 2020-05-24 15:53:51 -04:00
ConnorSkees
e5cceb60ec track span_before when parsing values
this allows us to remove many panics on invalid input
2020-05-24 15:30:06 -04:00
ConnorSkees
c9e5bc89c4 remove unwrap in unknown at rule parsing 2020-05-24 12:52:38 -04:00
ConnorSkees
3051cec45a disallow standalone @else 2020-05-24 12:47:04 -04:00
ConnorSkees
f52d784756 remove panic from unclosed call args 2020-05-24 10:18:15 -04:00
ConnorSkees
737a6ba90d emit proper error on unclosed quote 2020-05-24 10:04:30 -04:00
ConnorSkees
5137353cb4 rustfmt 2020-05-23 14:08:40 -04:00
ConnorSkees
c4cfb9112e eagerly evaluate \@if conditions 2020-05-23 13:39:47 -04:00
ConnorSkees
3c97400935 remove panics on malformed @ if 2020-05-23 12:48:34 -04:00
ConnorSkees
33c5acc35f use Identifier for FuncArg 2020-05-22 22:43:29 -04:00
ConnorSkees
b081fe780b handle escaped @ else
this commit makes the assumption that
https://github.com/sass/dart-sass/issues/1011 is unintended behavior
and may need to be reverted should dart-sass decide it is intended
2020-05-22 21:34:22 -04:00
ConnorSkees
2102781f62 create structure for identifiers
it looks like rustfmt also updated during this commit, so there are some
formatting changes
2020-05-22 18:21:18 -04:00
ConnorSkees
969726eb30 Revert string interning
There existed issues related to multithreaded tests that are difficult
to resolve. In the future interning may be reimplemented but in a more
limited capacity.

The motivation behind interning *values* was that it appeared checking
for named colors was responsible for much of the time lost when parsing
unquoted strings. If interning were to be reimplemented, it may make
sense to limit it solely to identifiers and style properties.
2020-05-22 14:20:31 -04:00
ConnorSkees
9a6c8ce019 add string interning
this seems to improve performance by ~20% as well as significantly
decrease memory usage
2020-05-21 22:46:40 -04:00
ConnorSkees
d39a45090a separate media and unknown at rules 2020-05-20 20:13:53 -04:00
ConnorSkees
eb7fe52074 minor cleanup 2020-05-19 18:28:18 -04:00
ConnorSkees
b58ed29fd0 add more span information
this resolves a lot of panics that occurred when there was no more input
2020-05-17 00:35:07 -04:00
ConnorSkees
d4f67b5ed9 clippy 2020-05-16 18:38:37 -04:00
ConnorSkees
dcdd2a1cb1 edge case in which @ include had no args AND no semicolon 2020-05-16 16:54:34 -04:00
ConnorSkees
4b15b27119 refactor mixin args 2020-05-13 23:56:47 -04:00
ConnorSkees
0cbdc67f06 improve scoping with regard to function variables existing 2020-05-13 01:32:29 -04:00
ConnorSkees
6729f24b17 Value::inspect returns cow 2020-05-06 11:50:35 -04:00
ConnorSkees
26df276266 Value::to_css_string returns a Cow<'static, str> 2020-05-05 11:08:34 -04:00
ConnorSkees
96e916e750 handle negative values in @for 2020-05-02 15:11:58 -04:00
ConnorSkees
269f37034a clippy 2020-04-28 08:27:35 -04:00
ConnorSkees
c7ed27bb45 remove superfluous impl Display 2020-04-26 22:51:09 -04:00
ConnorSkees
003bd87caf simplify parsing of @ for to/through 2020-04-26 22:35:06 -04:00
ConnorSkees
3615835e03 allow @content in more contexts 2020-04-26 21:29:09 -04:00
ConnorSkees
6f57797c29 error inspects message 2020-04-26 19:12:36 -04:00
ConnorSkees
cfa734e412 allow control flow inside @content 2020-04-26 18:40:05 -04:00
ConnorSkees
ce833b7c03 proper type for @each when single variable 2020-04-26 15:02:39 -04:00
ConnorSkees
f1b60019a1 handle self referential default args 2020-04-26 13:51:49 -04:00
ConnorSkees
d49eb7e18b explicitly enumerate missing at rule kinds 2020-04-26 01:37:51 -04:00
ConnorSkees
f60089f4f9 refactor parsing and eval of @ each 2020-04-24 22:58:28 -04:00
ConnorSkees
99ae3ae30a test for multiline comments in subtraction 2020-04-23 19:44:20 -04:00
ConnorSkees
409ac80921 handle multiline comments surrounding @ if condition 2020-04-23 19:32:32 -04:00
ConnorSkees
69764ceaa3 allow arbitrary control flow inside @ for 2020-04-23 18:53:19 -04:00
ConnorSkees
9bb7c05d19 improve handling of @ while scoping 2020-04-23 18:14:42 -04:00
ConnorSkees
ca318d47df properly handle @ while in functions 2020-04-23 15:23:53 -04:00
ConnorSkees
f9dfd05ea1 move check inside for loop 2020-04-23 15:16:27 -04:00
ConnorSkees
5b33b8fc74 refactor @ for to be used in @ function 2020-04-23 13:57:10 -04:00
ConnorSkees
3805eaab2b clippy 2020-04-21 18:22:26 -04:00
ConnorSkees
38c45129d9 refactor function eval 2020-04-21 11:32:27 -04:00
ConnorSkees
b2e3322f9a eval @each list 2020-04-21 03:19:04 -04:00
ConnorSkees
4ca6e304a5 allow at-rules other than else to follow @ if 2020-04-20 10:57:35 -04:00