Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: pkg/compiler/lib/src/environment.dart

Issue 1819053002: Split loader from the rest of the compiler. This adds several abstractions to (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add environment.dart Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/environment.dart
diff --git a/pkg/compiler/lib/src/environment.dart b/pkg/compiler/lib/src/environment.dart
new file mode 100644
index 0000000000000000000000000000000000000000..29c98615f0bfb491afe1e48536bc6d95f46de07c
--- /dev/null
+++ b/pkg/compiler/lib/src/environment.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Collects definitions provided to the compiler via the `-D` flag.
+///
+/// Environment variables can be used in the user code in two ways. From
+/// conditional imports, and from `const String.fromEnvironment` and
+/// other similar constructors.
+abstract class Environment {
+ /// Return the string value of the given key.
+ ///
+ /// Note that `bool.fromEnvironment` and `int.fromEnvironment` are also
+ /// implemented in terms of `String.fromEnvironment`.
+ String valueOf(String key);
+}

Powered by Google App Engine
This is Rietveld 408576698