ConnorSkees
b4b2edc9a4
use Identifier for SassFunction names
2020-05-22 20:13:39 -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
b15740976c
remove superfluous allocations when resolving idents
2020-05-22 13:49:19 -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
d88ac86bd1
consolidate builtin imports
2020-05-18 17:50:52 -04:00
ConnorSkees
1fb6822259
rename register to declare
2020-05-16 18:01:06 -04:00
ConnorSkees
6729f24b17
Value::inspect returns cow
2020-05-06 11:50:35 -04:00
ConnorSkees
0aed492123
move builtin fns to outer scope to reduce nesting
2020-04-30 19:36:34 -04:00
ConnorSkees
26aabb42ad
simplify declaration of meta fns
2020-04-30 18:31:55 -04:00
ConnorSkees
2eef3e9f6a
store &'static str rather than String for builtin fn names
2020-04-30 15:00:57 -04:00
ConnorSkees
f4f4fe2e03
wrap match in Ok rather than all branches
2020-04-26 18:51:08 -04:00
ConnorSkees
680790c49a
replace max_args! macro with builtin method
2020-04-22 06:17:52 -04:00
ConnorSkees
52c6ed0b64
remove QuoteKind::Single variant
2020-04-18 13:19:30 -04:00
ConnorSkees
62f9f7da4f
integrate error handling with codemap
2020-04-12 19:37:12 -04:00
ConnorSkees
ef282c5c18
consolidate inspect implementations
2020-04-06 00:27:09 -04:00
ConnorSkees
b7be1705a2
args and default values are lazily evaluated
2020-04-04 18:17:04 -04:00
ConnorSkees
24983b9d20
rustfmt
2020-04-04 14:13:17 -04:00
ConnorSkees
943299de74
better handling of $module in get-function
2020-04-04 12:45:30 -04:00
ConnorSkees
065f6515e9
disallow both css and module in get-function
2020-04-04 12:38:07 -04:00
ConnorSkees
051185e280
implement builtin function call()
2020-04-04 12:31:43 -04:00
ConnorSkees
c0eaf4c5f6
allow semicolon after closing brace
2020-04-04 03:00:38 -04:00
ConnorSkees
81c85a6f86
handle builtin functions in get-function
2020-04-03 23:49:44 -04:00
ConnorSkees
3f98d1abca
initial implementation of get-function()
2020-04-03 21:38:34 -04:00
ConnorSkees
60c16de830
inspect([]) => []
2020-04-03 16:53:45 -04:00
ConnorSkees
8e3e23c6cd
builtin functions take args by value
2020-04-02 13:45:14 -04:00
ConnorSkees
f69bbb3b69
rustfmt
2020-03-23 22:13:11 -04:00
ConnorSkees
ae33efcc30
inspect for empty list returns ()
2020-03-23 20:14:47 -04:00
ConnorSkees
b7492a8546
mixin-exists allows 2 args
2020-03-23 15:26:07 -04:00
ConnorSkees
81c5a34211
function-exists allows 2 args
2020-03-23 15:25:26 -04:00
ConnorSkees
4b529a1236
proper error messages in (mixin|function)-exists
2020-03-23 15:22:16 -04:00
ConnorSkees
68d2bc7e17
global variables feature-exists
2020-03-23 15:06:04 -04:00
ConnorSkees
0f310e9582
proper error message for non-string to feature-exists
2020-03-23 15:02:50 -04:00
ConnorSkees
b91683b02e
implement builtin function global-var-exists
2020-03-23 14:53:22 -04:00
ConnorSkees
d0b56c57d2
handle quoted strings in variable-exists
2020-03-23 14:34:03 -04:00
ConnorSkees
2db2ab10ca
feature-exists units-level-3
2020-03-19 23:53:29 -04:00
ConnorSkees
dcb712e3d4
Refactor unit conversions into separate file
2020-03-19 16:24:31 -04:00
ConnorSkees
42787ec700
proper error message in unit()
when not given number
2020-03-17 10:10:42 -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
844b506872
Value operations can fail
2020-02-17 10:27:04 -05:00
ConnorSkees
23b90aa97e
Use remove() rather than .get() to avoid a clone
2020-02-16 22:04:54 -05:00
ConnorSkees
26b0f2c998
Add max_args! to most functions
2020-02-16 18:18:57 -05:00
ConnorSkees
f081259b02
Refactor meta builtins
2020-02-16 18:15:56 -05:00
ConnorSkees
d300cd046a
Use SassError over Option inside builtins
2020-02-16 10:14:17 -05:00
ConnorSkees
7811a3e056
function-exists
searches builtin functions and ignores quotes
2020-02-14 18:41:42 -05:00
ConnorSkees
c7f1941823
Boilerplate for builtin function call()
2020-02-09 15:36:30 -05:00
ConnorSkees
4585558266
Add (variable|function|mixin)-exists builtin functions
2020-02-08 17:41:54 -05:00
ConnorSkees
783e43b765
clippy
2020-02-08 17:03:43 -05:00
ConnorSkees
76b2685894
Lex and parse named colors
2020-02-07 00:10:43 -05:00