49 Commits

Author SHA1 Message Date
ConnorSkees
c1b5ff5730 prettify imports 2020-06-16 20:00:11 -04:00
ConnorSkees
71dd7df951 reimplement parsing 2020-06-16 19:38:30 -04:00
ConnorSkees
ec83a9dff7 clippy 2020-05-24 17:41:24 -04:00
ConnorSkees
2a4d4f960b remove all unwraps from style parsing 2020-05-24 16:49:49 -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
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
f8b8025d7c fix panic when missing colon in style 2020-05-17 11:09:21 -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
daf7f247cf refactor iteration over intermediate values 2020-05-01 03:13:20 -04:00
ConnorSkees
4cdcf4f0d4 use peekmore rather than std::iter::Peekable 2020-04-20 03:45:28 -04:00
ConnorSkees
62f9f7da4f integrate error handling with codemap 2020-04-12 19:37:12 -04:00
ConnorSkees
44ff1c99b3 add helper function Value::from_vec 2020-04-06 00:11:18 -04:00
ConnorSkees
beff60ad31 clippy 2020-03-30 17:06:23 -04:00
ConnorSkees
57a704172f properly handle silent comments in styles 2020-03-30 02:21:41 -04:00
ConnorSkees
9e38fbc747 remove leftover debug statements 2020-03-29 19:51:35 -04:00
ConnorSkees
07505399da remove the lexer 2020-03-29 19:42:27 -04:00
ConnorSkees
51b080e6eb proper error message for missing closing brace and semicolon 2020-03-21 10:40:38 -04:00
ConnorSkees
061694bd63 Initial implementation of !global (some issues remain) 2020-03-17 20:13:53 -04:00
ConnorSkees
3181d58441 refactor and cleaning 2020-03-01 14:53:52 -05:00
ConnorSkees
d7b22a41a6 Properly handle & in most contexts 2020-03-01 12:03:14 -05:00
ConnorSkees
624cf06f69 clippy 2020-02-29 16:13:57 -05:00
ConnorSkees
a91ab9007e Rename Token method equals_symbol to is_symbol 2020-02-28 01:01:31 -05:00
ConnorSkees
fba6f2eb73 Properly emit quotes after interpolation 2020-02-24 18:58:09 -05:00
ConnorSkees
465ac1b381 Fix bug where styles after quote were gobbled 2020-02-24 18:11:01 -05:00
ConnorSkees
8c6be57872 Handle curly braces in quotes in styles 2020-02-24 17:47:32 -05:00
ConnorSkees
53861ccb0d clippy 2020-02-22 17:57:13 -05:00
ConnorSkees
735f222e15 Style namespaces can have variables come before them 2020-02-22 16:41:10 -05:00
ConnorSkees
e7de93bd38 Proper error message for undefined variables 2020-02-17 07:55:03 -05:00
ConnorSkees
f817598a9d Refactor error handling 2020-02-16 10:54:25 -05:00
ConnorSkees
7fcfeee97e clippy 2020-02-09 19:07:44 -05:00
ConnorSkees
6bc96aeff4 clippy and rustfmt 2020-02-02 10:27:08 -05:00
ConnorSkees
ea03f71928 Refactor style parsing 2020-02-01 21:59:23 -05:00
ConnorSkees
8e42d73c1e Initial implementation of nested styles 2020-02-01 19:33:56 -05:00
ConnorSkees
3f929066c4 Rename eat_interpolation() to parse_interpolation() 2020-02-01 19:24:37 -05:00
ConnorSkees
9503b3288b Initial implementation of Value 2020-01-25 09:58:53 -05:00
ConnorSkees
30cac02f9c Add IsComment trait and devour_comment utils 2020-01-25 09:54:38 -05:00
ConnorSkees
25b4bebdf8 Make everything private except StyleSheet 2020-01-20 13:15:47 -05:00
ConnorSkees
720b1e9f22 Reduce usage of .clone() 2020-01-18 20:24:28 -05:00
ConnorSkees
c6fe179eeb Refactor and consolidate interpolation parsing 2020-01-14 17:39:19 -05:00
ConnorSkees
cdbd4ff9a6 Considate variable dereferencing into util function 2020-01-12 20:56:07 -05:00
ConnorSkees
33843dd2ac Refactor various devour_whitespace methods into single util function 2020-01-12 20:15:27 -05:00
ConnorSkees
2439579d20 Initial implementation of @include and mixin eval 2020-01-12 19:56:58 -05:00
ConnorSkees
107a7d996e Refactor how scope is handled and basic mixin parsing 2020-01-12 17:44:49 -05:00
ConnorSkees
bd4b38550c Handle interpolation inside selectors and styles 2020-01-12 10:54:46 -05:00
ConnorSkees
a74d22cce9 Document some internal enums and structs 2020-01-08 20:58:02 -05:00
ConnorSkees
a3ecfbbf3e Preserve toplevel multiline comments and add tests for them 2020-01-08 20:39:05 -05:00
ConnorSkees
d2f9fc8e78 Reformat imports 2020-01-06 17:06:37 -05:00
ConnorSkees
3ba585b40d Refactor style parsing to separate module 2020-01-06 16:50:16 -05:00