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

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

Issue 10697003: Various token issues fixed in the compiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Unit test tests for erroneous results Created 8 years, 5 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 | « no previous file | lib/compiler/implementation/scanner/token.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 5
6 /** 6 /**
7 * If true, print a warning for each method that was resolved, but not 7 * If true, print a warning for each method that was resolved, but not
8 * compiled. 8 * compiled.
9 */ 9 */
10 final bool REPORT_EXCESS_RESOLUTION = false; 10 final bool REPORT_EXCESS_RESOLUTION = false;
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 class SourceSpan { 886 class SourceSpan {
887 final Uri uri; 887 final Uri uri;
888 final int begin; 888 final int begin;
889 final int end; 889 final int end;
890 890
891 const SourceSpan(this.uri, this.begin, this.end); 891 const SourceSpan(this.uri, this.begin, this.end);
892 892
893 static withCharacterOffsets(Token begin, Token end, 893 static withCharacterOffsets(Token begin, Token end,
894 f(int beginOffset, int endOffset)) { 894 f(int beginOffset, int endOffset)) {
895 final beginOffset = begin.charOffset; 895 final beginOffset = begin.charOffset;
896 final endOffset = end.charOffset + end.slowCharLength; 896 final endOffset = end.charOffset + end.slowCharCount;
897 897
898 // [begin] and [end] might be the same for the same empty token. This 898 // [begin] and [end] might be the same for the same empty token. This
899 // happens for instance when scanning '$$'. 899 // happens for instance when scanning '$$'.
900 assert(endOffset >= beginOffset); 900 assert(endOffset >= beginOffset);
901 return f(beginOffset, endOffset); 901 return f(beginOffset, endOffset);
902 } 902 }
903 } 903 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/scanner/token.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698