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

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

Issue 11033003: Unparse new library syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 compiler.cancel("duplicated library declaration", node: tag); 51 compiler.cancel("duplicated library declaration", node: tag);
52 } else { 52 } else {
53 library.libraryTag = tag; 53 library.libraryTag = tag;
54 } 54 }
55 } else if (tag.isPart) { 55 } else if (tag.isPart) {
56 StringNode uri = tag.uri; 56 StringNode uri = tag.uri;
57 Uri resolved = base.resolve(uri.dartString.slowToString()); 57 Uri resolved = base.resolve(uri.dartString.slowToString());
58 tagState = checkTag(TagState.SOURCE, tag); 58 tagState = checkTag(TagState.SOURCE, tag);
59 loadPart(tag, resolved, library); 59 loadPart(tag, resolved, library);
60 } else { 60 } else {
61 compiler.cancel("illegal script tag: ${tag.tag}", node: tag); 61 compiler.internalError("Unhandled library tag.", node: tag);
62 } 62 }
63 } 63 }
64 64
65 // Apply patch, if any. 65 // Apply patch, if any.
66 if (library.uri.scheme == 'dart') { 66 if (library.uri.scheme == 'dart') {
67 compiler.patchDartLibrary(library, library.uri.path); 67 compiler.patchDartLibrary(library, library.uri.path);
68 } 68 }
69 69
70 // Now that we have processed all the source tags, it is safe to 70 // Now that we have processed all the source tags, it is safe to
71 // start loading other libraries. 71 // start loading other libraries.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 | « dart/lib/compiler/implementation/scanner/parser.dart ('k') | dart/lib/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698