Skip to content

Commit 5709d90

Browse files
committed
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.
1 parent 7457d2e commit 5709d90

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

lib/src/async_environment.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,11 @@ class AsyncEnvironment {
209209
_mixins.toList(),
210210
_content);
211211

212-
/// Returns a new global environment.
212+
/// Returns a new environment to use for an imported file.
213213
///
214-
/// The returned environment shares this environment's global variables,
215-
/// functions, and mixins, but not its modules.
216-
AsyncEnvironment global() => AsyncEnvironment._(
214+
/// The returned environment shares this environment's variables, functions,
215+
/// and mixins, but not its modules.
216+
AsyncEnvironment forImport() => AsyncEnvironment._(
217217
{},
218218
{},
219219
null,

lib/src/environment.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// DO NOT EDIT. This file was generated from async_environment.dart.
66
// See tool/grind/synchronize.dart for details.
77
//
8-
// Checksum: b497eab76eb15ba7bfc4f1cecf71ff9f9c1fb2a5
8+
// Checksum: f02d694ae04ee7fb2219d7930049480eda1fd734
99
//
1010
// ignore_for_file: unused_import
1111

@@ -215,11 +215,11 @@ class Environment {
215215
_mixins.toList(),
216216
_content);
217217

218-
/// Returns a new global environment.
218+
/// Returns a new environment to use for an imported file.
219219
///
220-
/// The returned environment shares this environment's global variables,
221-
/// functions, and mixins, but not its modules.
222-
Environment global() => Environment._(
220+
/// The returned environment shares this environment's variables, functions,
221+
/// and mixins, but not its modules.
222+
Environment forImport() => Environment._(
223223
{},
224224
{},
225225
null,

lib/src/visitor/async_evaluate.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,7 @@ class _EvaluateVisitor
13831383
}
13841384

13851385
List<ModifiableCssNode> children;
1386-
var environment = _environment.global();
1386+
var environment = _environment.forImport();
13871387
await _withEnvironment(environment, () async {
13881388
var oldImporter = _importer;
13891389
var oldStylesheet = _stylesheet;

lib/src/visitor/evaluate.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// DO NOT EDIT. This file was generated from async_evaluate.dart.
66
// See tool/grind/synchronize.dart for details.
77
//
8-
// Checksum: eb095e782e2983223945d189caadc649b081a676
8+
// Checksum: a5181b80dae7d37a33d231ca4a50487d204bb8c3
99
//
1010
// ignore_for_file: unused_import
1111

@@ -1380,7 +1380,7 @@ class _EvaluateVisitor
13801380
}
13811381

13821382
List<ModifiableCssNode> children;
1383-
var environment = _environment.global();
1383+
var environment = _environment.forImport();
13841384
_withEnvironment(environment, () {
13851385
var oldImporter = _importer;
13861386
var oldStylesheet = _stylesheet;

0 commit comments

Comments
 (0)