summaryrefslogtreecommitdiff
path: root/scss/expression.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Python 3 compatibility, at least with syntax and builtins.Eevee (Alex Munroe)2013-08-021-6/+8
| | | | Adds our very first dependency, on `six`.
* Better support for `transparent`, including on output.Eevee (Alex Munroe)2013-08-011-2/+0
|
* Remove old unit stuff.Eevee (Alex Munroe)2013-07-311-1/+1
|
* Some parser fixes. Allow arbitrary units.Eevee (Alex Munroe)2013-07-311-5/+7
| | | | | | | | | The C-based scanner ignored restriction lists due to only accepting tuples and lists, whereas yapps usually passes in sets. It should now be in line with the Python scanner. Also, it turns out that variables in functions could cause parse errors that were being ignored; this is now fixed.
* Rewrite NumberValue to handle arbitrary unit combinations.Eevee (Alex Munroe)2013-07-311-4/+2
| | | | | Now matches Sass semantics much more closely, and understands intermediate units in expressions like "1px * 1px / 1px".
* Support "transparent".Eevee (Alex Munroe)2013-07-301-0/+2
|
* Leave / alone when (probably) not part of an expression.Eevee (Alex Munroe)2013-07-291-19/+52
|
* Greatly simplify color shortening.Eevee (Alex Munroe)2013-07-261-6/+3
| | | | | | | | | | | | | | CSS types now know whether they're expected to be rendered compressed or not, and so can choose the most appropriate representation. Colors in particular now try each of several possible renderings and choose the shortest. (short_colors is still a separate setting, though compress implies it.) This removes the need for a full-document regex to shuffle colors around, solving several problems related to color names that aren't actually colors. It also kills off several regexes and dicts and brings us closer to Ruby parity.
* Make this function name check hack work with other callables.Eevee2013-07-151-1/+1
|
* Tidy up formatting of the grammar.Eevee2013-07-101-1/+0
|
* NullValue -> NullEevee2013-07-101-2/+2
|
* Rewrite the String type.Eevee2013-07-101-5/+7
| | | | | | Unifies quoted and unquoted strings. Single quotes are now preserved. Also moves the result of `type-of` into the type system, hurrah.
* Added tests for all the core Sass functions.Eevee2013-06-201-9/+6
| | | | | | | | | | | | | | | | There are some failures, which are for once helpfully marked with xfail. Other minor fixes: - grayscale() hasn't worked for forever due to incorrect arity. Oops. - The rather terse `eval_expr` is now `evaluate_expression`, and it no longer has a `raw` argument; instead it ALWAYS returns a CSS value, and the only caller that used `raw=False` now performs that logic directly. - ColorValue grew an alternative and slightly saner constructor. Hopefully this is the first of many.
* Simplify BooleanValue.Eevee2013-05-291-22/+18
|
* Refactor and simplify variable storage and expression evaluation.Eevee2013-05-231-106/+90
| | | | | | | | Variables, functions, and mixins are now all stored within a single Namespace object, which can easily spin off child namespaces. Calculator methods no longer need to accept a rule at all, making it possible to parse and evaluate expressions in a vacuum.
* Avoid expanding colors on load.Eevee2013-05-231-2/+12
|
* Break functions and mixins out of rule.options.Eevee2013-05-231-6/+7
| | | | | Also introduces ChainMap, used for scoping instead of options, and subclasses it to build in the variable name normalization.
* Promote eval_expr and interpolate to Calculator methods.Eevee2013-05-231-73/+73
|
* Move Calculator into expression.py.Eevee2013-05-231-5/+97
|
* Replace CachedScanner with an AST cache.Eevee2013-05-231-78/+22
| | | | Slows us down a bit; still figuring out why.
* Remove rule and library from the expression grammar.Eevee2013-05-231-52/+47
|
* Rework expression parser to spit out an AST rather than evaluating as it goes.Eevee2013-05-231-115/+218
|
* Interpolated mixins names normalizedGerman M. Bravo2013-05-021-2/+1
|
* Cleanups, variables names fixed, small issues fixedGerman M. Bravo2013-05-021-1/+2
|
* Remove lingering references to rule.index.Eevee2013-05-021-2/+2
|
* Remove some debugging code that no longer works anyway.Eevee2013-02-261-1/+1
|
* Finish rule to object conversion.Eevee2013-02-261-9/+7
|
* Big Sass function breakout.Eevee2013-02-211-16/+21
| | | | | | | | | | | | - FunctionRegistry is now FunctionLibrary, which sounds more like a thing and less like I had no idea what to call it. - Built-in functions are all added to the library decorator-style. - Built-in functions have been split into several smaller modules. - The stuff in parseutil turns out not to be related to parsing, so it's been broken apart too.
* Break out expression parsing and resolution.Eevee2013-02-131-0/+482