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

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

Issue 10890007: Remove more warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/tree/nodes.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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } else if (tag.isLibrary()) { 52 } else if (tag.isLibrary()) {
53 tagState = checkTag(TagState.LIBRARY, tag); 53 tagState = checkTag(TagState.LIBRARY, tag);
54 if (library.libraryTag !== null) { 54 if (library.libraryTag !== null) {
55 compiler.cancel("duplicated library declaration", node: tag); 55 compiler.cancel("duplicated library declaration", node: tag);
56 } else { 56 } else {
57 library.libraryTag = tag; 57 library.libraryTag = tag;
58 } 58 }
59 } else if (tag.isSource()) { 59 } else if (tag.isSource()) {
60 tagState = checkTag(TagState.SOURCE, tag); 60 tagState = checkTag(TagState.SOURCE, tag);
61 importSourceFromTag(tag, resolved, library); 61 importSourceFromTag(tag, resolved, library);
62 } else if (tag.isResource()) {
63 tagState = checkTag(TagState.RESOURCE, tag);
64 compiler.reportWarning(tag, 'ignoring resource tag');
65 } else { 62 } else {
66 compiler.cancel("illegal script tag: ${tag.tag}", node: tag); 63 compiler.cancel("illegal script tag: ${tag.tag}", node: tag);
67 } 64 }
68 } 65 }
69 66
70 // Apply patch, if any. 67 // Apply patch, if any.
71 if (library.uri.scheme == 'dart') { 68 if (library.uri.scheme == 'dart') {
72 compiler.patchDartLibrary(library, library.uri.path); 69 compiler.patchDartLibrary(library, library.uri.path);
73 } 70 }
74 71
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 static const int RESOURCE = 4; 226 static const int RESOURCE = 4;
230 227
231 /** Next state. */ 228 /** Next state. */
232 static const List<int> NEXT = 229 static const List<int> NEXT =
233 const <int>[NO_TAG_SEEN, 230 const <int>[NO_TAG_SEEN,
234 IMPORT, // Only one library tag is allowed. 231 IMPORT, // Only one library tag is allowed.
235 IMPORT, 232 IMPORT,
236 SOURCE, 233 SOURCE,
237 RESOURCE]; 234 RESOURCE];
238 } 235 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/resolver.dart ('k') | lib/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698