Chromium Code Reviews| Index: lib/src/summary.dart |
| diff --git a/lib/src/summary.dart b/lib/src/summary.dart |
| index f5c8ab6918d903fef192e6f469a98a2a4eb4c03d..2e341295fc618223890ef53f766f1cc188129c98 100644 |
| --- a/lib/src/summary.dart |
| +++ b/lib/src/summary.dart |
| @@ -152,17 +152,27 @@ class MessageSummary implements Summary { |
| 'level': level, |
| 'message': message, |
| 'url': '${span.sourceUrl}', |
| - 'start': span.start.offset, |
| - 'end': span.end.offset, |
| + 'start': [span.start.offset, span.start.line, span.start.column], |
| + 'end': [span.end.offset, span.end.line, span.end.column], |
| 'text': span.text, |
| + 'contextLine': span is SourceSpanContext |
| + ? (span as SourceSpanContext).contextLine |
|
Siggi Cherem (dart-lang)
2015/03/23 22:01:44
it's frustrating that here we are required to put
vsm
2015/03/23 22:11:34
You could file a type promo bug on this.
Siggi Cherem (dart-lang)
2015/03/26 22:20:18
We chatted offline: turns out this is a legitimate
|
| + : null, |
| }; |
| void accept(SummaryVisitor visitor) => visitor.visitMessage(this); |
| static MessageSummary parse(Map json) { |
| - var start = new SourceLocation(json['start'], sourceUrl: json['url']); |
| - var end = new SourceLocation(json['end'], sourceUrl: json['url']); |
| - var span = new SourceSpanBase(start, end, json['text']); |
| + var start = new SourceLocation(json['start'][0], |
| + sourceUrl: json['url'], |
| + line: json['start'][1], |
| + column: json['start'][2]); |
| + var end = new SourceLocation(json['end'][0], |
| + sourceUrl: json['url'], line: json['end'][1], column: json['end'][2]); |
| + var context = json['contextLine']; |
| + var span = context != null |
| + ? new SourceSpanWithContext(start, end, json['text'], context) |
| + : new SourceSpanBase(start, end, json['text']); |
| return new MessageSummary( |
| json['kind'], json['level'], span, json['message']); |
| } |