Connor Skees
5bf03c15d6
consume utf8 bom in parser, not lexer
2020-08-21 06:54:03 -04:00
Connor Skees
c19eda6f89
deny scientific notation exponents below -99
...
1e999 and 1e-999 were able to cause hangs as we use arbitrary precision
numbers rather than floating point. this may change in the future (see
sass/sass#2892 )
2020-08-20 18:55:00 -04:00
Connor Skees
921b6e4f8d
do not panic on modulo by 0
2020-08-20 18:55:00 -04:00
Connor Skees
f9c163e557
no longer panic on unimplemented division
...
not implemented, but makes fuzzing less noisy
2020-08-19 20:04:25 -04:00
Connor Skees
f2d1a82f34
remove unwraps from escape parsing
...
these could not cause panics, but it is nice to reduce the number of
unwraps either way
2020-08-19 14:26:07 -04:00
Connor Skees
6849cd578f
refactor variable value parsing to use predicates
2020-08-19 07:13:32 -04:00
Connor Skees
c89013d607
add test for malformed bracketed list missing closing brace
2020-08-19 05:26:24 -04:00
Connor Skees
0d7208ccf0
add tests for numbers plus !important
, colors, and arglists
2020-08-19 04:14:49 -04:00
Connor Skees
d9d9777467
add tests for bools and important
plus quoted string
2020-08-19 04:02:47 -04:00
Connor Skees
cb1eecde74
add tests for nan in unary ops
2020-08-19 03:52:45 -04:00
Connor Skees
849a8b4414
resolve todo!()
on malformed @use
missing string
2020-08-19 03:14:33 -04:00
Connor Skees
10e08fc8ec
remove peekmore todo
2020-08-19 03:10:19 -04:00
Connor Skees
7358eb16dc
resolve todo!()
inside malformed module fn call
2020-08-18 12:29:01 -04:00
Connor Skees
6debd2ef52
!global
variables declared inside control flow not at root do not also add variable to current scope
2020-08-18 05:55:54 -04:00
Connor Skees
6630a1c2ea
correctly handle!global
variables inside control flow when not at root
2020-08-18 03:55:26 -04:00
Connor Skees
48de92fdc0
ambiguous keyword operators are not treated as function calls
2020-08-18 03:06:52 -04:00
Connor Skees
00a7659e69
refactor calculation of default variables
2020-08-18 00:17:12 -04:00
Connor Skees
8d1e8a99c5
refactor how default variables are evaluated
2020-08-17 06:16:18 -04:00
Connor Skees
9548eb6deb
convert single quotes to double quotes in calc
2020-08-17 04:48:11 -04:00
Connor Skees
7acaa94870
better handle strings passed to special css functions
2020-08-17 04:35:00 -04:00
Connor Skees
9b9946c0ee
allow units beginning with a single -
2020-08-17 03:58:29 -04:00
Connor Skees
a0786619de
@content
may have call args even when it has no parens
2020-08-17 03:30:54 -04:00
Connor Skees
5bcf499942
&
is null inside selectors at root
2020-08-17 03:13:45 -04:00
Connor Skees
befcb15cb5
!default variables can override if the value is null
2020-08-17 02:42:43 -04:00
Connor Skees
253bc3b35f
deny comma separated lists without parens as keys to map
2020-08-16 20:00:14 -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
a9be640124
arguments do not affect variables in outer scopes
2020-08-15 21:33:44 -04:00
Connor Skees
74bb9bad92
refactor bracketed list and number parsing to separate functions
2020-08-15 20:33:38 -04:00
Connor Skees
34dd92f78f
hyphen followed by interpolation is not treated as subtraction
2020-08-15 20:18:37 -04:00
Connor Skees
a665cb13cc
remove cfg(test)
from test files
2020-08-11 20:22:24 -04:00
Connor Skees
45508a7665
add support for unicode ranges
2020-08-11 14:46:06 -04:00
Connor Skees
5133d580de
improve error message for selector-parse
and deny open curly brace
2020-08-11 02:00:10 -04:00
Connor Skees
0c7e2017d5
use patched version of peekmore
2020-08-08 21:38:59 -04:00
Connor Skees
fb785cf71c
revert "make predicate optional for callers"
...
This reverts commit fda7f340cea60a90031aa8edffd8ab3a06d05992.
This commit made tests fail that it shouldn't have. The performance wins
from this change were negligible, so it is easiest to just revert it and
potentially come back to this change later
2020-08-08 14:36:59 -04:00
Connor Skees
fda7f340ce
make predicate optional for callers
2020-08-08 02:27:54 -04:00
Connor Skees
a9bef0e24e
more robustly parse default function arguments
2020-08-08 01:57:56 -04:00
Connor Skees
a3a21928c0
resolve map parsing regression involving trailing commas in doubly nested maps
2020-08-07 20:10:49 -04:00
Connor Skees
56030f1292
recognize plain css @import
s beginning with //
2020-08-07 17:44:51 -04:00
Connor Skees
36bdea138d
refactor how the from value in @for
is parsed
2020-08-07 17:33:30 -04:00
Connor Skees
fac8b86a6a
resolve integer underflow in @for
when both to and from and i32::MIN
2020-08-07 16:51:17 -04:00
Connor Skees
f33739aa0f
add more tests for malformed @for
...
test for capitalization of keywords, error messages, and regression
tests for integer overflows resulting when `from` or `to` ==
`std::i32::MAX`
2020-08-07 16:21:15 -04:00
Connor Skees
38a37a3997
more robustly parse !optional
in selectors
2020-08-07 13:40:22 -04:00
Connor Skees
36a55e582c
use consume_char_if_exists
to simplify parsing
2020-08-07 13:07:28 -04:00
Connor Skees
1f14bc92e3
refactor parsing of parens using predicate
2020-08-07 13:01:58 -04:00
Connor Skees
be032b66f0
refactor parsing of media queries to use predicate parsing
2020-08-07 12:04:43 -04:00
Connor Skees
d5b2410a8c
allow multiline comments in more contexts
2020-08-07 11:39:14 -04:00
Connor Skees
7a4a191d59
allow variable declarations before and between @use
2020-08-07 02:10:51 -04:00
Connor Skees
a7ccb4d6d3
move module variable parsing to module file
2020-08-07 02:03:46 -04:00
Connor Skees
438abe52be
allow redeclaration of module variables
2020-08-07 02:01:04 -04:00
Connor Skees
bb0b352af2
move module parsing to separate file
2020-08-06 22:05:50 -04:00