mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-26 20:24:42 +01:00
Rename Environment.global to Environment.forImport
The previous name was misleading, since the environment could exist in a nested context and thus contain local members.
This commit is contained in:
parent
7457d2e9e7
commit
5709d90aaa
@ -209,11 +209,11 @@ class AsyncEnvironment {
|
||||
_mixins.toList(),
|
||||
_content);
|
||||
|
||||
/// Returns a new global environment.
|
||||
/// Returns a new environment to use for an imported file.
|
||||
///
|
||||
/// The returned environment shares this environment's global variables,
|
||||
/// functions, and mixins, but not its modules.
|
||||
AsyncEnvironment global() => AsyncEnvironment._(
|
||||
/// The returned environment shares this environment's variables, functions,
|
||||
/// and mixins, but not its modules.
|
||||
AsyncEnvironment forImport() => AsyncEnvironment._(
|
||||
{},
|
||||
{},
|
||||
null,
|
||||
|
@ -5,7 +5,7 @@
|
||||
// DO NOT EDIT. This file was generated from async_environment.dart.
|
||||
// See tool/grind/synchronize.dart for details.
|
||||
//
|
||||
// Checksum: b497eab76eb15ba7bfc4f1cecf71ff9f9c1fb2a5
|
||||
// Checksum: f02d694ae04ee7fb2219d7930049480eda1fd734
|
||||
//
|
||||
// ignore_for_file: unused_import
|
||||
|
||||
@ -215,11 +215,11 @@ class Environment {
|
||||
_mixins.toList(),
|
||||
_content);
|
||||
|
||||
/// Returns a new global environment.
|
||||
/// Returns a new environment to use for an imported file.
|
||||
///
|
||||
/// The returned environment shares this environment's global variables,
|
||||
/// functions, and mixins, but not its modules.
|
||||
Environment global() => Environment._(
|
||||
/// The returned environment shares this environment's variables, functions,
|
||||
/// and mixins, but not its modules.
|
||||
Environment forImport() => Environment._(
|
||||
{},
|
||||
{},
|
||||
null,
|
||||
|
@ -1383,7 +1383,7 @@ class _EvaluateVisitor
|
||||
}
|
||||
|
||||
List<ModifiableCssNode> children;
|
||||
var environment = _environment.global();
|
||||
var environment = _environment.forImport();
|
||||
await _withEnvironment(environment, () async {
|
||||
var oldImporter = _importer;
|
||||
var oldStylesheet = _stylesheet;
|
||||
|
@ -5,7 +5,7 @@
|
||||
// DO NOT EDIT. This file was generated from async_evaluate.dart.
|
||||
// See tool/grind/synchronize.dart for details.
|
||||
//
|
||||
// Checksum: eb095e782e2983223945d189caadc649b081a676
|
||||
// Checksum: a5181b80dae7d37a33d231ca4a50487d204bb8c3
|
||||
//
|
||||
// ignore_for_file: unused_import
|
||||
|
||||
@ -1380,7 +1380,7 @@ class _EvaluateVisitor
|
||||
}
|
||||
|
||||
List<ModifiableCssNode> children;
|
||||
var environment = _environment.global();
|
||||
var environment = _environment.forImport();
|
||||
_withEnvironment(environment, () {
|
||||
var oldImporter = _importer;
|
||||
var oldStylesheet = _stylesheet;
|
||||
|
Loading…
Reference in New Issue
Block a user