OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library dev_compiler.src.codegen.code_generator; | 5 library dev_compiler.src.codegen.code_generator; |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 | 8 |
9 import 'package:analyzer/src/generated/ast.dart' show CompilationUnit; | 9 import 'package:analyzer/src/generated/ast.dart' show CompilationUnit; |
10 import 'package:analyzer/src/generated/element.dart' | 10 import 'package:analyzer/src/generated/element.dart' |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 return new Uri(path: suffix); | 122 return new Uri(path: suffix); |
123 } | 123 } |
124 assert(index == 0); | 124 assert(index == 0); |
125 return new Uri( | 125 return new Uri( |
126 scheme: 'package', path: path.joinAll(parts.sublist(index + 1))); | 126 scheme: 'package', path: path.joinAll(parts.sublist(index + 1))); |
127 } | 127 } |
128 | 128 |
129 CodeGenerator(String outDir, this.root, this.rules) | 129 CodeGenerator(String outDir, this.root, this.rules) |
130 : outDir = path.absolute(outDir); | 130 : outDir = path.absolute(outDir); |
131 | 131 |
132 void generateLibrary(Iterable<CompilationUnit> units, LibraryInfo info, | 132 /// Return a hash, if any, that can be used for caching purposes. When two |
| 133 /// invocations to this function return the same hash, the underlying |
| 134 /// code-generator generated the same code. |
| 135 String generateLibrary(Iterable<CompilationUnit> units, LibraryInfo info, |
133 CheckerReporter reporter); | 136 CheckerReporter reporter); |
134 } | 137 } |
OLD | NEW |