Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 library front_end.options; | |
| 6 | |
| 7 import 'compilation_error.dart'; | |
| 8 | |
| 9 /// Callback used to report errors encountered during compilation. | |
| 10 typedef void ErrorHandler(CompilationError error); | |
| 11 | |
| 12 /// Front-end Analysis options relevant to compiler back ends. | |
| 13 /// | |
| 14 /// TODO(paulberry): add a mechanism to allow file system operations to be | |
| 15 /// stubbed out for testing. | |
| 16 class Options { | |
| 17 /// The path to the Dart SDK. | |
| 18 /// | |
| 19 /// If `null`, the SDK will be searched for using [Platform.script] as a | |
|
scheglov
2016/10/16 21:19:38
Do you mean Platform.resolvedExecutable?
Paul Berry
2016/10/17 12:54:39
Done.
| |
| 20 /// starting point. | |
| 21 String sdkPath; | |
| 22 | |
| 23 /// Callback to which compilation errors should be delivered. | |
| 24 /// | |
| 25 /// If `null`, the first error will be reported by throwing an exception of | |
| 26 /// type [CompilationError]. | |
| 27 ErrorHandles onError; | |
|
scheglov
2016/10/16 21:19:38
ErrorHandler
Paul Berry
2016/10/17 12:54:39
Done.
| |
| 28 | |
| 29 /// Path to the ".packages" file. | |
| 30 /// | |
| 31 /// If `null`, the ".packages" file will be found via the standard | |
| 32 /// package_config search algorithm. | |
| 33 String packagesFilePath; | |
| 34 | |
| 35 /// Paths to the input summary files (excluding the SDK summary). | |
| 36 List<String> inputSummaries = []; | |
| 37 | |
| 38 /// Path to the SDK summary file. | |
| 39 /// | |
| 40 /// If `null`, the SDK summary will be searched for at a default location | |
| 41 /// within [sdkPath]. | |
| 42 String sdkSummary; | |
| 43 | |
| 44 /// URI override map. | |
| 45 /// | |
| 46 /// This is a map from Uri to file path which overrides the normal URI | |
| 47 /// resolution algorithm. If not set, the normal URI resolution algorithm | |
| 48 /// will always be used. | |
| 49 /// | |
| 50 /// TODO(paulberry): transition analyzer and dev_compiler to use the | |
| 51 /// "file:///bazel-root" mechanism, and then remove this. | |
| 52 @deprecated | |
| 53 Map<Uri, String> uriOverride = {}; | |
| 54 | |
| 55 /// Bazel roots. | |
| 56 /// | |
| 57 /// Any Uri that resolves to "file:///bazel-root/$rest" will be searched for | |
| 58 /// at "$root/$rest" ("$root\\$rest" in Windows), where "$root" is drawn from | |
| 59 /// this list. If the file is not found at any of those locations, the URI | |
| 60 /// "file:///bazel-root/$rest" will be used directly. | |
| 61 /// | |
| 62 /// Intended use: if the Bazel workspace is located at path "$workspace", this | |
| 63 /// could be set to `['$workspace', '$workspace/bazel-bin', | |
| 64 /// '$workspace/bazel-genfiles']`, effectively overlaying source and generated | |
| 65 /// files. | |
| 66 List<String> bazelRoots = []; | |
| 67 | |
| 68 /// Sets the platform bit, which determines which patch files should be | |
| 69 /// applied to the SDK. | |
| 70 /// | |
| 71 /// The value should be a power of two, and should match the `PLATFORM` bit | |
| 72 /// flags in sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart. If | |
| 73 /// zero, no patch files will be applied. | |
| 74 int platformBit; | |
| 75 | |
| 76 /// The declared variables for use by configurable imports and constant | |
| 77 /// evaluation. | |
| 78 Map<String, String> declaredVariables; | |
| 79 } | |
| OLD | NEW |