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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/compiler.dart

Issue 12184017: MetadataAnnotation should be spannable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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 part of dart2js; 5 part of dart2js;
6 6
7 /** 7 /**
8 * If true, print a warning for each method that was resolved, but not 8 * If true, print a warning for each method that was resolved, but not
9 * compiled. 9 * compiled.
10 */ 10 */
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 node = currentElement; 443 node = currentElement;
444 } 444 }
445 if (node is Node) { 445 if (node is Node) {
446 return spanFromNode(node, uri); 446 return spanFromNode(node, uri);
447 } else if (node is Token) { 447 } else if (node is Token) {
448 return spanFromTokens(node, node, uri); 448 return spanFromTokens(node, node, uri);
449 } else if (node is HInstruction) { 449 } else if (node is HInstruction) {
450 return spanFromHInstruction(node); 450 return spanFromHInstruction(node);
451 } else if (node is Element) { 451 } else if (node is Element) {
452 return spanFromElement(node); 452 return spanFromElement(node);
453 } else if (node is MetadataAnnotation) {
454 return spanFromTokens(node.beginToken, node.endToken);
453 } else { 455 } else {
454 throw 'No error location.'; 456 throw 'No error location.';
455 } 457 }
456 } 458 }
457 459
458 void reportFatalError(String reason, Element element, 460 void reportFatalError(String reason, Element element,
459 {Node node, Token token, HInstruction instruction}) { 461 {Node node, Token token, HInstruction instruction}) {
460 withCurrentElement(element, () { 462 withCurrentElement(element, () {
461 cancel(reason, node: node, token: token, instruction: instruction, 463 cancel(reason, node: node, token: token, instruction: instruction,
462 element: element); 464 element: element);
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 1118
1117 void close() {} 1119 void close() {}
1118 1120
1119 toString() => name; 1121 toString() => name;
1120 1122
1121 /// Convenience method for getting an [api.CompilerOutputProvider]. 1123 /// Convenience method for getting an [api.CompilerOutputProvider].
1122 static NullSink outputProvider(String name, String extension) { 1124 static NullSink outputProvider(String name, String extension) {
1123 return new NullSink('$name.$extension'); 1125 return new NullSink('$name.$extension');
1124 } 1126 }
1125 } 1127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698