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

Unified Diff: dart/frog/leg/frog_leg.dart

Issue 9447100: Return null from stringValue and call slowToString() instead of toString(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: changes Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/frog/leg/emitter.dart ('k') | dart/frog/leg/namer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/frog/leg/frog_leg.dart
diff --git a/dart/frog/leg/frog_leg.dart b/dart/frog/leg/frog_leg.dart
index 2efa50f59922c5a2d15b910b9657164caeebe757..e9e58366ef58210c25314f1e929e9e75a76c838c 100644
--- a/dart/frog/leg/frog_leg.dart
+++ b/dart/frog/leg/frog_leg.dart
@@ -54,7 +54,8 @@ class WorldCompiler extends Compiler {
cancel('cannot find tokens to produce error message for $node.');
}
final startOffset = begin.charOffset;
- final endOffset = end.charOffset + end.toString().length;
+ // TODO(ahe): Compute proper end offset.
+ final endOffset = end.charOffset + 1;
return new frog.SourceSpan(current.file, startOffset, endOffset);
}
@@ -103,9 +104,8 @@ class WorldCompiler extends Compiler {
if (node !== null) {
print(spanFromNode(node, script).toMessageString("cancel leg: $reason"));
} else if (token !== null) {
- String tokenString = token.toString();
int begin = token.charOffset;
- int end = begin + tokenString.length;
+ int end = begin + 1; // TODO(ahe): Compute proper length.
print(script.file.getLocationMessage("cancel leg: $reason",
begin, end, true));
} else if (element !== null) {
« no previous file with comments | « dart/frog/leg/emitter.dart ('k') | dart/frog/leg/namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698