Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: lib/compiler/implementation/scanner/scanner_task.dart

Issue 10968010: Import scope rules updated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | lib/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | lib/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698