dart-sass/test
Natalie Weizenbaum a25bbb3fc7
Add a ParenthesizedExpression class (#503)
This allows us to accurately track the source spans for parenthesized
expressions, which in turn allows us to print accurate error
indications.

Adding a new class for this more accurately represents the structure
of the expression, but it also involves an extra allocation during
parsing and an extra level of nesting during evaluation which could
have a small but real performance impact.

We could alternatively add a package-internal setter for
Expression.span, and update the source span for parenthesized
expressions after they're initially parsed. However, this has its own
downsides: it adds complexity and mutability to the object model; and
many expression classes currently use lazily-generated spans, so
making them settable would require adding extra slots on those
classes.

I decided to go with the extra class because it only adds overhead
when parentheses are actually used in practice, as opposed to adding
overhead to every list/color/etc. The runtime overhead is also likely
to be mitigated if at any point we add a constant-folding step.
2018-10-17 16:52:32 -07:00
..
cli Add a ParenthesizedExpression class (#503) 2018-10-17 16:52:32 -07:00
dart_api Fix an import-resolution bug (#488) 2018-10-11 15:06:26 -07:00
node_api Get rid of the dart2 test tag (#477) 2018-09-19 15:28:47 -04:00
compressed_test.dart Remove space around combinators in compressed mode (#494) 2018-10-11 18:03:09 -07:00
dart_api_test.dart Use the latest test_descriptor features to clean up tests (#366) 2018-06-19 17:50:49 -07:00
ensure_npm_package.dart Run the Dart CLI tests from app snapshots on CI (#383) 2018-06-27 13:12:16 -07:00
hybrid.dart Use Dart 2 constants 2018-06-15 13:59:28 -07:00
io.dart Fix a couple more Grinder invocations (#387) 2018-06-27 14:32:44 -07:00
node_api_test.dart Get rid of the dart2 test tag (#477) 2018-09-19 15:28:47 -04:00
source_map_test.dart Properly adjust source maps when prepending encoding information (#470) 2018-09-10 15:38:30 -07:00
synchronize_test.dart Fix a bug where we were setting the base URL of stylesheets wrong (#370) 2018-06-20 17:43:40 -07:00
utils.dart Use Dart 2 constants 2018-06-15 13:59:28 -07:00