| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 class ScannerTask extends CompilerTask { | 5 class ScannerTask extends CompilerTask { |
| 6 ScannerTask(Compiler compiler) : super(compiler); | 6 ScannerTask(Compiler compiler) : super(compiler); |
| 7 String get name => 'Scanner'; | 7 String get name => 'Scanner'; |
| 8 | 8 |
| 9 void scanLibrary(LibraryElement library) { | 9 void scanLibrary(LibraryElement library) { |
| 10 var compilationUnit = library.entryCompilationUnit; | 10 var compilationUnit = library.entryCompilationUnit; |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 }); | 172 }); |
| 173 compiler.withCurrentElement(element, () { | 173 compiler.withCurrentElement(element, () { |
| 174 compiler.reportError(new Identifier(element.position()), | 174 compiler.reportError(new Identifier(element.position()), |
| 175 'duplicated import'); | 175 'duplicated import'); |
| 176 }); | 176 }); |
| 177 } | 177 } |
| 178 }); | 178 }); |
| 179 } else { | 179 } else { |
| 180 imported.forEachExport((Element element) { | 180 imported.forEachExport((Element element) { |
| 181 compiler.withCurrentElement(element, () { | 181 compiler.withCurrentElement(element, () { |
| 182 library.addToScope(element, compiler); | 182 library.addImport(element, compiler); |
| 183 }); | 183 }); |
| 184 }); | 184 }); |
| 185 } | 185 } |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 | 188 |
| 189 class DietParserTask extends CompilerTask { | 189 class DietParserTask extends CompilerTask { |
| 190 DietParserTask(Compiler compiler) : super(compiler); | 190 DietParserTask(Compiler compiler) : super(compiler); |
| 191 final String name = 'Diet Parser'; | 191 final String name = 'Diet Parser'; |
| 192 | 192 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 213 static const int RESOURCE = 4; | 213 static const int RESOURCE = 4; |
| 214 | 214 |
| 215 /** Next state. */ | 215 /** Next state. */ |
| 216 static const List<int> NEXT = | 216 static const List<int> NEXT = |
| 217 const <int>[NO_TAG_SEEN, | 217 const <int>[NO_TAG_SEEN, |
| 218 IMPORT, // Only one library tag is allowed. | 218 IMPORT, // Only one library tag is allowed. |
| 219 IMPORT, | 219 IMPORT, |
| 220 SOURCE, | 220 SOURCE, |
| 221 RESOURCE]; | 221 RESOURCE]; |
| 222 } | 222 } |
| OLD | NEW |