ConnorSkees
71dd7df951
reimplement parsing
2020-06-16 19:38:30 -04:00
Vincent Prouillet
9ae3ce52be
Fix fmt + sass
2020-05-26 16:29:39 +02:00
ConnorSkees
bb53aaab8a
replace std::borrow::Cow with beef::Cow
2020-05-25 13:09:20 -04:00
ConnorSkees
6d76e1518a
refactor away many unwrap
s
2020-05-25 00:57:59 -04:00
ConnorSkees
3c129780d0
span_before in quoted string
2020-05-24 16:27:07 -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
1382ea32ca
remove unwrap inside interpolated ident body parsing
2020-05-24 10:37:40 -04:00
ConnorSkees
042dbfa914
remove panics from missing identifiers
2020-05-24 08:56:53 -04:00
ConnorSkees
283a2097ff
rename Value::Ident to Value::String
2020-05-22 14:35:41 -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
67091115db
better handle - at the start of idents
2020-05-21 12:06:42 -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
2db3398fe2
properly handle escaped newlines in quoted strings
2020-05-16 17:20:53 -04:00
ConnorSkees
223dade62b
Emit proper error for escape sequence overflow
...
Before this commit, escape sequences above std::char::MAX ('\u{10ffff}')
would overflow and cause a panic. This commit replaces an `unwrap` with
`ok_or` and a clearer error message. This message will likely change
in the future in order to better conform to the `dart-sass` implementation
which currently also fails to cleanly handle this overflow.
See https://github.com/kaj/rsass/pull/73
2020-05-16 16:22:33 -04:00
ConnorSkees
26df276266
Value::to_css_string returns a Cow<'static, str>
2020-05-05 11:08:34 -04:00
ConnorSkees
3ca48702a1
interpolated_ident_body doesn't allocate its own string
2020-05-02 11:47:49 -04:00
ConnorSkees
d53b44aafe
tabs are not emitted literally
2020-04-26 19:02:43 -04:00
ConnorSkees
4a2503b04c
refactor attribute parsing
2020-04-26 00:55:38 -04:00
ConnorSkees
a8141d2488
handle edge case in parsing of units ending with hypen followed by whitespace
2020-04-25 20:19:50 -04:00
ConnorSkees
a86d717f26
properly parse variable flags
2020-04-23 21:30:25 -04:00
ConnorSkees
3805eaab2b
clippy
2020-04-21 18:22:26 -04:00
ConnorSkees
cdfd89cd75
add TODO to interpolated_ident_body
2020-04-21 02:17:11 -04:00
ConnorSkees
0052c754cb
rename ident_body to be more explicit it does not include interpolation
2020-04-20 14:57:41 -04:00
ConnorSkees
46552b3a56
remove usage of use super::*
`
2020-04-20 14:53:52 -04:00
ConnorSkees
c121bbc1e3
refactor string utils to separate file
2020-04-20 14:35:16 -04:00