|
5 | 5 | // DO NOT EDIT. This file was generated from async_import_cache.dart. |
6 | 6 | // See tool/grind/synchronize.dart for details. |
7 | 7 | // |
8 | | -// Checksum: a0b4e091d7a729fbadceabdb1f51ab2631e2df4a |
| 8 | +// Checksum: bcdb7643d7bd5740fdb4586869f1b4cd362cf902 |
9 | 9 | // |
10 | 10 | // ignore_for_file: unused_import |
11 | 11 |
|
@@ -38,6 +38,10 @@ final class ImportCache { |
38 | 38 | /// The importers to use when loading new Sass files. |
39 | 39 | final List<Importer> _importers; |
40 | 40 |
|
| 41 | + /// Whether to parse [StyleRule.parsedSelector]s rather than |
| 42 | + /// [StyleRule.selector]s when loading new Sass files. |
| 43 | + final bool _parseSelectors; |
| 44 | + |
41 | 45 | /// The canonicalized URLs for each non-canonical URL. |
42 | 46 | /// |
43 | 47 | /// The `forImport` in each key is true when this canonicalization is for an |
@@ -95,15 +99,20 @@ final class ImportCache { |
95 | 99 | Iterable<Importer>? importers, |
96 | 100 | Iterable<String>? loadPaths, |
97 | 101 | PackageConfig? packageConfig, |
98 | | - }) : _importers = _toImporters(importers, loadPaths, packageConfig); |
| 102 | + bool parseSelectors = false, |
| 103 | + }) : _importers = _toImporters(importers, loadPaths, packageConfig), |
| 104 | + _parseSelectors = parseSelectors; |
99 | 105 |
|
100 | 106 | /// Creates an import cache without any globally-available importers. |
101 | | - ImportCache.none() : _importers = const []; |
| 107 | + ImportCache.none({bool parseSelectors = false}) |
| 108 | + : _importers = const [], |
| 109 | + _parseSelectors = parseSelectors; |
102 | 110 |
|
103 | 111 | /// Creates an import cache without any globally-available importers, and only |
104 | 112 | /// the passed in importers. |
105 | | - ImportCache.only(Iterable<Importer> importers) |
106 | | - : _importers = List.unmodifiable(importers); |
| 113 | + ImportCache.only(Iterable<Importer> importers, {bool parseSelectors = false}) |
| 114 | + : _importers = List.unmodifiable(importers), |
| 115 | + _parseSelectors = parseSelectors; |
107 | 116 |
|
108 | 117 | /// Converts the user's [importers], [loadPaths], and [packageConfig] |
109 | 118 | /// options into a single list of importers. |
@@ -331,6 +340,7 @@ final class ImportCache { |
331 | 340 | url: originalUrl == null |
332 | 341 | ? canonicalUrl |
333 | 342 | : originalUrl.resolveUri(canonicalUrl), |
| 343 | + parseSelectors: _parseSelectors, |
334 | 344 | ); |
335 | 345 | }); |
336 | 346 | } |
|
0 commit comments