Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/source_file.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/source_file.dart b/sdk/lib/_internal/compiler/implementation/source_file.dart |
| index 45636ea7b13360f0a786a358f9e6234a5c2c92bc..af1a2be15d336bf34c0262f46ecfb67198468a62 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/source_file.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/source_file.dart |
| @@ -118,10 +118,14 @@ abstract class SourceFile { |
| var line = getLine(start); |
| var column = getColumn(line, start); |
| - var buf = new StringBuffer( |
| - '${filename}:${line + 1}:${column + 1}: $message'); |
| - if (includeText) { |
| - buf.write('\n'); |
| + var buf = new StringBuffer('${filename}:'); |
| + if (start != end || start != 0) { |
| + // Line/column info is relevant. |
| + buf.write('${line + 1}:${column + 1}:'); |
| + } |
| + buf.write('\n$message\n'); |
|
ahe
2014/06/19 14:23:03
Why did you add a newline before the message?
It
Johnni Winther
2014/06/19 18:45:10
Because on the command line the hint (at the begin
ahe
2014/06/19 18:58:03
Makes sense. I'll add a comment.
How would feel a
Johnni Winther
2014/06/19 20:08:48
Sounds good.
|
| + |
| + if (start != end && includeText) { |
| String textLine; |
| // +1 for 0-indexing, +1 again to avoid the last line of the file |
| if ((line + 2) < lineStarts.length) { |