Connor Skees
d029fd2001
implement module mixins and meta.load-css
2020-08-06 03:46:58 -04:00
Connor Skees
123ed80e9a
resolve merge conflicts with master
2020-07-31 17:37:00 -04:00
Connor Skees
da3c3eabfc
refactor how @content
scoping is handled
2020-07-30 23:40:34 -04:00
Connor Skees
da9c0b78b2
variables declared in mixins can be accessed after @content
2020-07-30 22:26:24 -04:00
Connor Skees
cfd2e00ebb
respect $module
argument to mixin-exists
2020-07-30 18:35:34 -04:00
Connor Skees
a7325436ca
respect $module
argument to get-function
2020-07-30 17:46:56 -04:00
Connor Skees
a03ad51b71
allow @use
of user-defined modules
2020-07-30 17:21:32 -04:00
Connor Skees
d6a1d64dcb
implement @use ... as *;
syntax
2020-07-27 18:55:38 -04:00
Connor Skees
cee16fece7
loop indexing vars do not affect outer scopes
2020-07-08 23:17:20 -04:00
Connor Skees
f9455caeea
derive Copy for Identifier
2020-07-08 22:38:56 -04:00
Connor Skees
5551a8f8a8
avoid hashing identifier for function when empty
2020-07-08 21:01:05 -04:00
Connor Skees
5b2cc1df77
use btreemap to back scope
2020-07-08 20:50:18 -04:00
Connor Skees
ca370eb9b0
avoid allocating unnecessary errors for getting functions
2020-07-08 20:35:15 -04:00
Connor Skees
05b6b539ad
avoid creating unnecessary errors
...
previously, when attempting to locate a mixin/fn/variable, we would
check if it existing simply by calling `get_{mixin,fn,var}`. this caused
*large* performance regressions in bootstrap, where almost 15% of the
execution time was spent in these functions. the cause for this was that
`get_*` both allocates a new String and boxes the error.
2020-07-08 20:26:54 -04:00
Connor Skees
47902c077c
refactor how scopes are calculated
2020-07-08 14:51:04 -04:00
Connor Skees
0c0c154b66
avoid cloning identifiers for functions
2020-07-07 21:11:45 -04:00
Connor Skees
33f81f5bbe
simplify Scope::get_var
2020-07-07 17:36:52 -04:00
Connor Skees
9b4815e75f
avoid unnecessary cloning of identifiers
2020-07-07 17:22:18 -04:00
Connor Skees
596def3906
refactor value evaluation
2020-07-03 12:38:20 -04:00
Connor Skees
e211aff677
remove dead code from Scope impl
2020-06-28 03:28:50 -04:00
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
2102781f62
create structure for identifiers
...
it looks like rustfmt also updated during this commit, so there are some
formatting changes
2020-05-22 18:21:18 -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
9bb7c05d19
improve handling of @ while scoping
2020-04-23 18:14:42 -04:00
ConnorSkees
62f9f7da4f
integrate error handling with codemap
2020-04-12 19:37:12 -04:00
ConnorSkees
ece0f5afde
allow !global in mixins and functions
2020-04-04 14:53:08 -04:00
ConnorSkees
0979f3957b
Revert "check global scope for variable before local"
...
This reverts commit 27a9578b17a8ed8227cb190af38762111edae58f.
This ended up not being the desired behavior. It seems that instead of
checking the global scope first, variables declared with `!global` are
inserted into both the local and global scopes.
2020-03-24 00:31:56 -04:00
ConnorSkees
27a9578b17
check global scope for variable before local
2020-03-24 00:26:55 -04:00
ConnorSkees
b91683b02e
implement builtin function global-var-exists
2020-03-23 14:53:22 -04:00
ConnorSkees
785c824cd8
check global scope for functions as well
2020-03-23 14:46:15 -04:00
ConnorSkees
415b19fc47
implement @content inside mixins
2020-03-22 15:08:13 -04:00
ConnorSkees
907ac3390c
refactor functions and mixins into atrule folder
2020-03-22 14:26:33 -04:00
ConnorSkees
9bbdf762ce
clippy
2020-03-18 20:11:14 -04:00
ConnorSkees
061694bd63
Initial implementation of !global (some issues remain)
2020-03-17 20:13:53 -04:00