OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Fletch 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 library servicec.compiler; | 5 library servicec.compiler; |
6 | 6 |
7 import 'dart:async' show | 7 import 'dart:async' show |
8 Future; | 8 Future; |
9 | 9 |
10 import 'dart:io'; | 10 import 'dart:io'; |
11 | 11 |
12 import 'package:compiler/src/scanner/scannerlib.dart' show | 12 import 'package:compiler/src/tokens/token.dart' show |
13 Token; | 13 Token; |
14 | 14 |
15 import 'error_handling_listener.dart' show | 15 import 'error_handling_listener.dart' show |
16 ErrorHandlingListener; | 16 ErrorHandlingListener; |
17 | 17 |
18 import 'errors.dart' show | 18 import 'errors.dart' show |
19 CompilationError, | 19 CompilationError, |
20 ErrorReporter, | 20 ErrorReporter, |
21 UndefinedServiceError, | 21 UndefinedServiceError, |
22 InternalCompilerError; | 22 InternalCompilerError; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 {Target target: Target.ALL}) async { | 99 {Target target: Target.ALL}) async { |
100 String input = new File(path).readAsStringSync(); | 100 String input = new File(path).readAsStringSync(); |
101 Iterable<CompilationError> errors = await compileInput( | 101 Iterable<CompilationError> errors = await compileInput( |
102 input, path, resourcesDirectory, outputDirectory, target: target); | 102 input, path, resourcesDirectory, outputDirectory, target: target); |
103 if (errors.isNotEmpty) { | 103 if (errors.isNotEmpty) { |
104 new ErrorReporter(path, relativePath).report(errors); | 104 new ErrorReporter(path, relativePath).report(errors); |
105 return false; | 105 return false; |
106 } | 106 } |
107 return true; | 107 return true; |
108 } | 108 } |
OLD | NEW |