41 Commits

Author SHA1 Message Date
ConnorSkees
2eef3e9f6a store &'static str rather than String for builtin fn names 2020-04-30 15:00:57 -04:00
ConnorSkees
680790c49a replace max_args! macro with builtin method 2020-04-22 06:17:52 -04:00
ConnorSkees
33ccabce7b box color in value 2020-04-21 18:54:19 -04:00
ConnorSkees
62f9f7da4f integrate error handling with codemap 2020-04-12 19:37:12 -04:00
ConnorSkees
0ddabb5afd hsl/hsla 4 args special functions 2020-04-07 00:04:19 -04:00
ConnorSkees
6b817dcb24 hsl/hsla 3 args special functions 2020-04-06 23:38:17 -04:00
ConnorSkees
b7be1705a2 args and default values are lazily evaluated 2020-04-04 18:17:04 -04:00
ConnorSkees
81c85a6f86 handle builtin functions in get-function 2020-04-03 23:49:44 -04:00
ConnorSkees
8e3e23c6cd builtin functions take args by value 2020-04-02 13:45:14 -04:00
ConnorSkees
981bf27cb8 properly parse and emit bracketed lists 2020-03-23 19:56:24 -04:00
ConnorSkees
795c8bdb05 error messages end in periods 2020-03-23 12:53:55 -04:00
ConnorSkees
01c1cf3bb3 prefer the word lightness over luminance 2020-03-23 12:52:23 -04:00
ConnorSkees
2698e8257b improve rgb(a)/hsl(a) 1 arg errors 2020-03-23 12:42:58 -04:00
ConnorSkees
6460c97ef4 better error messages for zero arg hsl(a) 2020-03-22 23:41:02 -04:00
ConnorSkees
6aae433d21 better error message for missing rgb/rgba args 2020-03-22 23:28:19 -04:00
ConnorSkees
0be8828bf0 make better use of num traits 2020-03-22 22:28:54 -04:00
ConnorSkees
20f702b40b Implement 1 arg for hsl and hsla 2020-03-19 23:44:53 -04:00
ConnorSkees
dcb712e3d4 Refactor unit conversions into separate file 2020-03-19 16:24:31 -04:00
ConnorSkees
51585235c3 Remove decl! macro
This lets rustfmt work and gives better autocomplete and error messages
inside builtin functions.
2020-03-16 10:35:38 -04:00
ConnorSkees
276134eb93 prefer hashmap over btreemap where ordering is unimportant 2020-03-03 19:51:02 -05:00
ConnorSkees
23b90aa97e Use remove() rather than .get() to avoid a clone 2020-02-16 22:04:54 -05:00
ConnorSkees
87579b181b clippy 2020-02-16 18:03:19 -05:00
ConnorSkees
3e89a0a057 Handle numbers passed to saturate 2020-02-16 17:13:17 -05:00
ConnorSkees
d4dd360682 Handle number passed to invert() 2020-02-16 17:00:31 -05:00
ConnorSkees
948c489785 Properly implement weighted inversion 2020-02-16 16:53:28 -05:00
ConnorSkees
ca0e2d47cb Grayscale function behaves differently when given a number 2020-02-16 16:11:24 -05:00
ConnorSkees
048ab562b2 more bounds checking 2020-02-16 15:34:21 -05:00
ConnorSkees
24dc99affe Include argument name in bounds error 2020-02-16 15:17:01 -05:00
ConnorSkees
5f59c71752 Bounds checking macro for builtin functions 2020-02-16 15:14:14 -05:00
ConnorSkees
0aac40441d Put max_args! everywhere 2020-02-16 12:35:03 -05:00
ConnorSkees
9a36c3be73 More builtin color function errors 2020-02-16 12:14:20 -05:00
ConnorSkees
1995b5ec6e Error messages in builtins 2020-02-16 11:59:04 -05:00
ConnorSkees
7c451e333e Arg errors for (de)saturate 2020-02-16 11:51:25 -05:00
ConnorSkees
402d36133c Proper errors for $color 2020-02-16 11:17:57 -05:00
ConnorSkees
b4ea8913f0 HSLA errors (experimental) 2020-02-16 11:12:17 -05:00
ConnorSkees
f817598a9d Refactor error handling 2020-02-16 10:54:25 -05:00
ConnorSkees
6d0686866e hsla doesn't care about units 2020-02-16 10:28:33 -05:00
ConnorSkees
d300cd046a Use SassError over Option inside builtins 2020-02-16 10:14:17 -05:00
ConnorSkees
46e4ccd5f9 Allow alpha in hsl() 2020-02-15 06:55:20 -05:00
ConnorSkees
19f59efd98 Handle alpha over 1 (a little bit) 2020-02-14 20:13:58 -05:00
ConnorSkees
8f63694ffd Refactor color functions into separate modules 2020-02-14 15:08:41 -05:00