| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 }); | 168 }); |
| 169 compiler.withCurrentElement(element, () { | 169 compiler.withCurrentElement(element, () { |
| 170 compiler.reportError(new Identifier(element.position()), | 170 compiler.reportError(new Identifier(element.position()), |
| 171 'duplicated import'); | 171 'duplicated import'); |
| 172 }); | 172 }); |
| 173 } | 173 } |
| 174 }); | 174 }); |
| 175 } else { | 175 } else { |
| 176 imported.forEachExport((Element element) { | 176 imported.forEachExport((Element element) { |
| 177 compiler.withCurrentElement(element, () { | 177 compiler.withCurrentElement(element, () { |
| 178 library.addToScope(element, compiler); | 178 library.addImport(element, compiler); |
| 179 }); | 179 }); |
| 180 }); | 180 }); |
| 181 } | 181 } |
| 182 } | 182 } |
| 183 } | 183 } |
| 184 | 184 |
| 185 class DietParserTask extends CompilerTask { | 185 class DietParserTask extends CompilerTask { |
| 186 DietParserTask(Compiler compiler) : super(compiler); | 186 DietParserTask(Compiler compiler) : super(compiler); |
| 187 final String name = 'Diet Parser'; | 187 final String name = 'Diet Parser'; |
| 188 | 188 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 209 static const int RESOURCE = 4; | 209 static const int RESOURCE = 4; |
| 210 | 210 |
| 211 /** Next state. */ | 211 /** Next state. */ |
| 212 static const List<int> NEXT = | 212 static const List<int> NEXT = |
| 213 const <int>[NO_TAG_SEEN, | 213 const <int>[NO_TAG_SEEN, |
| 214 IMPORT, // Only one library tag is allowed. | 214 IMPORT, // Only one library tag is allowed. |
| 215 IMPORT, | 215 IMPORT, |
| 216 SOURCE, | 216 SOURCE, |
| 217 RESOURCE]; | 217 RESOURCE]; |
| 218 } | 218 } |
| OLD | NEW |