5
5
// DO NOT EDIT. This file was generated from async_evaluate.dart.
6
6
// See tool/grind/synchronize.dart for details.
7
7
//
8
- // Checksum: 9083313a65eb24875e7292b859202fd574daf46b
8
+ // Checksum: 8abca72a6d671844aa9eb075aef56f58fd71ddf7
9
9
//
10
10
// ignore_for_file: unused_import
11
11
@@ -419,9 +419,9 @@ class _EvaluateVisitor
419
419
var url = Uri .parse (arguments[0 ].assertString ("module" ).text);
420
420
var withMap = arguments[1 ].realNull? .assertMap ("with" )? .contents;
421
421
422
- Map <String , _ConfiguredValue > configuration ;
422
+ var configuration = const < String , _ConfiguredValue > {} ;
423
423
if (withMap != null ) {
424
- configuration = < String , _ConfiguredValue > {};
424
+ configuration = {};
425
425
var span = _callableNode.span;
426
426
withMap.forEach ((variable, value) {
427
427
var name =
@@ -531,11 +531,9 @@ class _EvaluateVisitor
531
531
{Uri baseUrl,
532
532
Map <String , _ConfiguredValue > configuration,
533
533
bool namesInErrors = false }) {
534
- configuration ?? = const {};
535
-
536
534
var builtInModule = _builtInModules[url];
537
535
if (builtInModule != null ) {
538
- if (configuration.isNotEmpty) {
536
+ if (configuration != null && configuration .isNotEmpty) {
539
537
throw _exception (
540
538
namesInErrors
541
539
? "Built-in module $url can't be configured."
@@ -595,12 +593,11 @@ class _EvaluateVisitor
595
593
Module <Callable > _execute (Importer importer, Stylesheet stylesheet,
596
594
{Map <String , _ConfiguredValue > configuration,
597
595
bool namesInErrors = false }) {
598
- configuration ?? = const {};
599
596
var url = stylesheet.span.sourceUrl;
600
597
601
598
var alreadyLoaded = _modules[url];
602
599
if (alreadyLoaded != null ) {
603
- if (configuration.isNotEmpty || _configuration.isNotEmpty) {
600
+ if (( configuration ?? _configuration) .isNotEmpty) {
604
601
throw _exception (namesInErrors
605
602
? "${p .prettyUri (url )} was already loaded, so it can't be "
606
603
"configured using \" with\" ."
@@ -643,7 +640,10 @@ class _EvaluateVisitor
643
640
_atRootExcludingStyleRule = false ;
644
641
_inKeyframes = false ;
645
642
646
- if (configuration.isNotEmpty) _configuration = Map .of (configuration);
643
+ if (configuration != null ) {
644
+ _configuration =
645
+ configuration.isEmpty ? const {} : Map .of (configuration);
646
+ }
647
647
648
648
visitStylesheet (stylesheet);
649
649
css = _outOfOrderImports == null
@@ -664,7 +664,7 @@ class _EvaluateVisitor
664
664
_atRootExcludingStyleRule = oldAtRootExcludingStyleRule;
665
665
_inKeyframes = oldInKeyframes;
666
666
667
- if (configuration.isNotEmpty && _configuration.isNotEmpty) {
667
+ if (configuration != null && _configuration.isNotEmpty) {
668
668
throw _exception (
669
669
namesInErrors
670
670
? "\$ ${_configuration .keys .first } was not declared with "
@@ -1774,7 +1774,7 @@ class _EvaluateVisitor
1774
1774
_environment.addModule (module, namespace: node.namespace);
1775
1775
},
1776
1776
configuration: node.configuration.isEmpty
1777
- ? null
1777
+ ? const {}
1778
1778
: {
1779
1779
for (var entry in node.configuration.entries)
1780
1780
entry.key: _ConfiguredValue (
0 commit comments