This also changes the string representation of ParenthesizedExpression
to fix the recommendations involving them (otherwise the calc
recommendation would be an invalid one).
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
This requires a lot of manual machinery when displaying stack traces
to the user, but it should make debugging errors (especially in JS)
much easier.
Works around dart-lang/sdk#10297 using expandos.
Instead, we create a single zone-scoped object that's visible for the
entire lifespan of the visitor, and which exposes evaluation internals
which can be updated as direct field modifications.
This dramatically improves the performance of a sample app using the
Carbon design system, and should generally improve apps that have a
lot of repeated @imports of library files. It's possible we can back
this out if it's not pulling its weight once we no longer support
@import.
`visitCalculationExpression` is now properly implemented.
This also adds concrete test classes that extend `RecursiveAstVisitor`
and `RecursiveStatementVisitor` to ensure similar issues are avoided in
the future whenever new AST nodes are added.
This check was previously checking whether *any* variables were left
in this configuration, which could include variables that were adopted
from outer configurations. This threw invalid errors when that outer
configuration would have been satisfied by another variable (or
forward) later in the file.
Closessass/sass#1460
`@at-root` should now work properly in a nested import as long as the
only `@use` or `@forward` rules present are for built-in modules.
This is a partial but not complete fix for #1347. It's a bit hacky to
special case built-in modules here, but since they represent the only
real legitimate case for using this combination of features, it lets us
fix the bug for this case and avoid the bordering-on-infeasible work of
fixing this for user-defined modules.
These getters are only available through the sass_api package. This
will allow the Sass embedded compiler to more explicitly send the
color information it has on hand.
Fixes#1401 and #1414.
Adds `Dependency`, `SassDeclaration`, and `SassReference` interfaces,
which expose some getters that multiple AST nodes have in common with a
single type.
These also add getters for common subspans (URL, name, and namespace) to
the interfaces.
We weren't properly merging multiple @extend rules that were added to
an upstream module at the same time, so some of them weren't being
marked as satisfied.
Closes#1393