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
b64ad5b1f3
resolve all clippy lints
2020-05-31 05:32:19 -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
3e5abf0587
remove keywords
2020-05-22 14:09:28 -04:00
ConnorSkees
5bed62c404
keywords are thread_local
2020-05-22 13:47:48 -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
45a29c9697
refactor Number::to_integer
2020-05-20 22:40:21 -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
0aed492123
move builtin fns to outer scope to reduce nesting
2020-04-30 19:36:34 -04:00
ConnorSkees
22098ca684
simplify declaration of string fns
2020-04-30 18:41:33 -04:00
ConnorSkees
8a3ba1ae07
make lowercase in place where possible
2020-04-30 16:08:35 -04:00
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
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
d67fe948d6
implement builtin function unique-id
2020-04-05 18:20:58 -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
d88342fd9b
rustfmt
2020-03-23 23:06:05 -04:00
ConnorSkees
2705d79d1a
str-slice by chars rather than bytes
2020-03-23 22:47:59 -04:00
ConnorSkees
712795544b
rustfmt
2020-03-23 14:33:44 -04:00
ConnorSkees
991b87f335
str-slice start/end equality does not preclude output
2020-03-23 14:16:27 -04:00
ConnorSkees
893c758e13
string length is number of chars
2020-03-23 14:11:06 -04:00
ConnorSkees
f4f9a79b2b
handle large integers in builtin string functions
2020-03-23 14:03:47 -04:00
ConnorSkees
0be8828bf0
make better use of num traits
2020-03-22 22:28:54 -04:00
ConnorSkees
0e0b01f595
unquoted, empty strings are null
2020-03-22 18:36:21 -04:00
ConnorSkees
d19c112765
str-len is a count of characters, not bytes
2020-03-22 18:24:09 -04:00
ConnorSkees
c392c33ad8
properly insert into empty strings
2020-03-22 18:13:55 -04:00
ConnorSkees
585786318f
handle double wide characters in str-insert
2020-03-22 17:49:21 -04:00
ConnorSkees
9965fe99fe
handle negative numbers more accurately in str-insert
2020-03-22 17:13:38 -04:00
ConnorSkees
047fd1d3de
handle str-insert edge cases
2020-03-22 16:49:41 -04:00
ConnorSkees
9bf2b9d16c
implement builtin function str-insert
2020-03-22 16:14:45 -04:00
ConnorSkees
c0ed933850
implement builtin function str-index
2020-03-22 15:58:32 -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
c68a55327b
Unquote empty string is null
2020-02-16 18:45:14 -05:00
ConnorSkees
3962c4410a
Proper error messages for str-slice
2020-02-16 18:42:35 -05:00
ConnorSkees
09e4537e78
Proper error in str-slice when passed float
2020-02-16 18:39:27 -05:00
ConnorSkees
c9f7289670
Error messages for string functions
2020-02-16 18:32:13 -05:00
ConnorSkees
26b0f2c998
Add max_args! to most functions
2020-02-16 18:18:57 -05:00
ConnorSkees
d300cd046a
Use SassError over Option inside builtins
2020-02-16 10:14:17 -05:00
ConnorSkees
19d68c3c5d
Handle str-slice $end-at is 0
2020-02-15 08:54:10 -05:00
ConnorSkees
d082583917
Handle negative numbers in str-slice()
2020-02-15 08:51:00 -05:00
ConnorSkees
fab55c5105
Properly handle str-slice()
when $start-at is 0
2020-02-15 08:33:42 -05:00