| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:collection' show HashSet, Queue; | 5 import 'dart:collection' show HashSet, Queue; |
| 6 import 'dart:convert' show JSON; | 6 import 'dart:convert' show JSON; |
| 7 import 'dart:io' show File; | 7 import 'dart:io' show File; |
| 8 | 8 |
| 9 import 'package:analyzer/analyzer.dart' | 9 import 'package:analyzer/analyzer.dart' |
| 10 show AnalysisError, CompilationUnit, ErrorSeverity; | 10 show AnalysisError, CompilationUnit, ErrorSeverity; |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 var uri = Uri.parse(source); | 592 var uri = Uri.parse(source); |
| 593 var scheme = uri.scheme; | 593 var scheme = uri.scheme; |
| 594 switch (scheme) { | 594 switch (scheme) { |
| 595 case "dart": | 595 case "dart": |
| 596 case "package": | 596 case "package": |
| 597 case "file": | 597 case "file": |
| 598 // A valid URI. | 598 // A valid URI. |
| 599 return uri; | 599 return uri; |
| 600 default: | 600 default: |
| 601 // Assume a file path. | 601 // Assume a file path. |
| 602 // TODO(jmesserly): shouldn't this be `path.toUri(path.absolute)`? |
| 602 return new Uri.file(path.absolute(source)); | 603 return new Uri.file(path.absolute(source)); |
| 603 } | 604 } |
| 604 } | 605 } |
| OLD | NEW |